(Disclaimer: The access_tokens and appIds in this post are fake and are just intended to look real)
I'm trying to generate an access_token using the call to the following:
That gives me an access_token in this format:
access_token=123456789000000|TR528Smvi4AXMM21Zhmi5XmJwmk
If I try to access a fan page that's protected with that token like this I get false back: http://graph.facebook.com/109813019043531?access_token=123456789000000|TR528Smvi4AXMM21Zhmi5XmJwmk
Now, if I use the Graph API Explorer and select the same App as the one I'm using above to generate the access token I get an access token that looks like this:
ABBDSqE43jFSSbrS7ujvyLZClfyKDCZBhAuLXTtr9nwelj4MFwlijzejljEoNItC3lijzm3shemzq3jDFCdAZD
If I use that access token to access the URL (http://graph.facebook.com/109813019043531) it works as expected.
My question is, what is the difference between the two and how can I programmatically generate one that works like the second token?
application secrets
oraccess tokens
. With that information someone could impersonate you, your application or your page and perform some malicious actions. I have removed the sensitive data from your post. Please be aware of this in the future. – Lix