php - Facebook access token for site feed -
i trying loading facebook feed webpage using:
https://graph.facebook.com/177610425663218/feed
for got access token graph explorer. problem token keeps running out:
error validating access token: session has expired @ unix time ...
i know create oauth login new token show feed on webpage. don't want oauth visitors of page. how constant access token site feed?
you can access token. create app , login using app_id
, app_secret
:
$response = file_get_contents('https://graph.facebook.com/oauth/access_token?type=client_cred&client_id=some_app_id&client_secret=the_appsecret'); $token = str_replace('access_token=', '', $response);
works me.
Comments
Post a Comment