I have written an article Upload photos to Facebook Fan Page using PHP. The code works fine but has only one problem. The user access token of the Facebook application is hard coded. See following line in the code:
//It can be found at https://developers.facebook.com/tools/access_token/
$access_token = '<Your access token>';
I cannot find anyway to dynamically fetch this user access token through PHP. ANy help will be highly appreciated.
well, if you have to dynamically generate accesstoken for each user, you need to take permissions dynamically,
please check this page: Permission, do carefully look at manage_pages permission, also do look at the access_token terminology
then you would get the permission to manage the page by generating this login url by which users would login to your pageapp:
here, in scope you should put ‘manage_pages’ and other permissions you need,then you should get your access_token by,