views:

65

answers:

1

i want create something like "link_to" which can link to "request for permission" in facebook, so if user click "allow" then redirect to my site and i can get their data.

my question is how to create a "link" like that? so i can get access token from facebook user. (i had register my app)

thx..

A: 

It's quite simple. Just redirect the user to the Facebook Auth Page:

https://graph.facebook.com/oauth/authorize?
    client_id=...&
    redirect_uri=http://www.example.com/callback&
    scope=user_photos,user_videos,publish_stream

There're several optional parameters you can pass to get the required site.

For further Information just read the corresponding paragraph on the Facebook Documentation ("Authenticating Users in a Web Application"):

http://developers.facebook.com/docs/authentication/

Henrik P. Hessel
"client id" is my app id ?
"http://www.example.com/callback" is my page?how do i get the value of "access token"?
what's inside the callback page