Hi to all,
I’m having problems with script that i’m making using PHP-SDK from facebook version 3.1.
Here is the situation I’m the user and i gave my app this permissions :
[0] => Array
(
[status_update] => 1
[photo_upload] => 1
[video_upload] => 1
[offline_access] => 1
[email] => 1
[create_note] => 1
[share_item] => 1
[bookmarked] => 1
[read_stream] => 1
[publish_stream] => 1
[user_birthday] => 1
[user_activities] => 1
[user_photos] => 1
[user_videos] => 1
[user_photo_video_tags] => 1
[user_notes] => 1
[user_checkins] => 1
[user_status] => 1
)
Now simple script is this …
$facebook = new Facebook(array(
'appId' => *******,
'secret' => *************,
'cookie' => true,
));
$albums = $this->facebook_api->api('/MYUSER_ID/albums');
print_r($albums);
When i check this from web ->facebook -> my app tab it works perfectly but when i try to run this script from shell it gives me an error :
shell script PHP Fatal error: Uncaught OAuthException: An access token is required to reques t this resource.
Strange thing is if i use fql.query for
“SELECT aid,cover_pid, name, created, modified, description FROM album WHERE owner = MYUSER_ID”; it returns results without problem!
WHY?? I know it’s access token, but as i understood my app has offline permissions it should work right?
Help please :*