What are the Steps to getting a Long Lasting Token For Posting To a Facebook Fan Page from a Server -


i have business page in facebook (known fan page in facebook vernacular).

i want post page whenever user takes action on app. want post page rather user (i.e. personal account). post come outside server (i using restfb).

i have gone through steps of authorizing personal account appropriate manage_pages permissions page. have gotten access token page. have been able post page page wanted to. problem token (through developer tools graph explorer) has expiration of hour. need last longer that, preferably forever.

i've looked around internet, including answer , posts point horrid fb docs or make vague references hooking outside application facebook application , posting through that. i've tried make work confused whole process, quite frankly (what callback address, example?).

anyway, i'd love see step step instructions in plain english on getting long lasting access token can use post 1 application facebook fan page.

please not refer fb documentation. terrible. i've been through dozen times @ least.

thank you.

here 2 steps can follow never expiring token fan page:

  1. firstly, need long lived user access token (that expires in 2 months). this, make following call:

     /oauth/access_token? grant_type=fb_exchange_token& client_id={app-id}& client_secret={app-secret}& fb_exchange_token={short-lived-token}  

    more details here . let me know if found difficulty this.

  2. get never expiring access token page using token obtained in above step(not normal token, thats main difference here)-

    $facebook->api("/page_id?fields=access_token"); 

so concept that: long lived page token should use long lived usrr token while making call.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -