You need to sign in to do that
Don't have an account?
Saransh
I am not able to get access_token from above URL.
I have tried below code but even then 'token' is returning null value.
Unable to fetch token from Parameter
I am not able to get access_token from above URL.
I have tried below code but even then 'token' is returning null value.
token = ApexPages.currentPage().getParameters().get('%23access_token');
Following code should works:
All Answers
Do is it possible for you to remove # from the URL and use
You can do apex function to get Full url and then split it up '#' using string function
Or
You can also use javascript function document.URL to get full Url and then split it where you find '#'.
Hope this helps you..
I have tried doing everything but I am not getting any value.
@Dushyant Sonwar - I did tried apex function ApexPages.currentPage().getUrl(). but this one giving me correct URL till '?' and after that debug=1. No other extra parameter value. Javascript also is not returning complete URL. You can give this a try by making a demo page and append parameter manually to your URL using '#' in front and then you would going to face the same thing.
@Sagar Pareek - I can't remove '#' because this token I am getting during facebook integration. So, facebook is returning it.
document.URL.split('#')[1].split('=')[1]
i used this and it is giving me the parameter value.
Following code should works: