user2136160
user2136160

Reputation: 245

(#200) Requires extended permission: publish_actions php

Hey guys i have a simple facebook app which uploads a photo to the users timeline. I already have the publish_actions approved.

How ever when i try to post the photo it returns

(#200) Requires extended permission: publish_actions

Here is my source code

try {
    // message must come from the user-end
    $data = ['source' => $fb->fileToUpload($generaratedImage), 'message' => 'Support your school team add support banner to your profile picture using'];
    $request = $fb->post('/me/photos', $data);
    $response = $request->getGraphNode()->asArray();
} catch(Facebook\Exceptions\FacebookResponseException $e) {
    // When Graph returns an error
    echo 'Graph returned an error: ' . $e->getMessage();
    exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
    // When validation fails or other local issues
    echo 'Facebook SDK returned an error: ' . $e->getMessage();
    exit;
}

But when i test it with the Open graph test user it works fine..

What am i missing here ?

I recently found when user log in to my app it say

This does not let the app post to Facebook.

how to fix this issue ?

Thanks in advance.

Upvotes: 0

Views: 4744

Answers (1)

C3roe
C3roe

Reputation: 96412

I already have the publish_actions approved.

Approved means Facebook allows you to ask normal users for that permission; it does of course not mean, that users have granted that permission to your app automatically.

You still need to ask the user for the permission, by sending them through the login flow.

Upvotes: 2

Related Questions