Getting Facebook Access Token from User Id and Facebook App Secret? -


i'm trying understand how facebook api works. end goal able read posts facebook page.

if has connected app on facebook can c# application posts public facebook page if knows facebook account id (and has facebook app secret hard coded).

if http requests needs make in order access token can used posts, , requests new access token before 1 expires?

if provide example in c# (maybe using acebooksdk.net library) great!

thanks.

the way using "the login flow web (without javascript sdk)" api user access token. user access token required sent graph api queries in order page posts.

the first step create app on facebook specify information want program able access via graph api. end user choose accept these permissions later.

the program creates web browser frame , navigates https://www.facebook.com/dialog/oauth?client_id={app-id}&redirect_uri=https://www.facebook.com/connect/login_success.html&response_type=token

the response type "token" means when (embedded) web browser redirected redirect_uri user access token added end of url fragment. e.g browser end on page url https://www.facebook.com/connect/login_success.html#access_token=access_token...

the redirect uri can facebook has specific 1 set aside scenario not hosting server want receive , process response.

basically facebook gathers information required user , sends them redirect_uri. information may require them login , accept permissions app on facebook requires.

so program keeps eye on url embedded browser on , when matches redirect_uri parses url contain data fragments , can close browser.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -