Solution: Getting A Facebook Access Token using Client-side Flow

Posted on June 7, 2011

0


Breaking change: Graph API PROFILE_ID/feed and PROFILE_ID/posts requires access_token

1.     Use offline_access to get a non-expiring access token

·        https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&scope=offline_access&response_type=token

2.     Copy the access token from the redirect_uri

·        http://YOUR_URL#access_token=166942940015970%7C2.sa0&expires_in=0

3.     Append your Facebook Graph url (example link from PrettyKlicks JSON Facebook feed)

·        https://graph.facebook.com/USER_ID/feed?access_token=166942940015970%7C2.sa0&expires_in=0&limit=6&date_format=l%20jS%20F%20Y%20h:i%20A&callback=?

Advertisements
Posted in: Web Parts