Matthew Lawson Matthew Lawson -4 years ago 134
PHP Question

Facebook app posting to page successfully, but posts are not visible to non-developers. Do I really have to review for an app with 1 user?

I have setup a facebook app to post images / videos to one particular fan page. It requests 'publish_actions' and 'manage_pages permissions. It is in developer mode and I have no intention to expand the functionality beyond posting to this single facebook page.

The code works correctly, it posts to the correct page and everything looks good whilst logged into the developer account / page admin (same account). But other facebook users cannot see the posts that have been made via the app. I was under the impression that apps didn't need to go through the review process for internal apps such as these?

Heres a quick stripped down version of the code for posting to the page:

FacebookSession::setDefaultApplication($settings['app_id'], $settings['secret']);
//This is user access_token not the pages.
$session = new FacebookSession( $settings['access_token'] );

$pageTokenResponse = (new FacebookRequest(
$session
, 'GET', '/' . $settings['page_id']
, array( 'fields' => 'access_token' )
))->execute()->getGraphObject(GraphPage::className());

//Retrieved Page Token
$pageToken = $pageTokenResponse->getProperty("access_token");

uploadUrlToFacebook($imgurl, $item->get_title(), $session, $pageToken, $settings['page_id']);

function uploadUrlToFacebook($url, $title, $session, $pageToken, $pageId){
$request = new FacebookRequest(
$session,
'POST',
"/$pageId/photos",
array (
'access_token' => $pageToken
,'url' => $url
,'message' => $title
)
);
$response = $request->execute();
}


I'm sure there is a stupid error either somewhere in the code or my apps setup but why can I see the posts but nobody else can ?

Answer Source

Turns out I had already selected some items for review before I properly understood the process so I ended up in a state of not being able to make the app live as I had pending review items. I deleted the permissions from the review queue, made the app live and all is good.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download