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 ?