Reputation: 3
This is my code:
<?php
require 'src/facebook.php';
$facebook = new Facebook(array(
'appId' => '25856*****93875',
'secret' => '7c3e95185d681ee6****8bcef1305352',
'cookie' => true
));
$user = $facebook->getUser();
if($user) {
try {
$statusUpdate = $facebook->api('/me/feed', 'post', array('link' => 'http://www.firsatdergisi.com/'));
} catch (FacebookApiException $e) {
echo $e->getMessage();
}
}
else
{
$url = 'https://www.facebook.com/dialog/oauth?client_id=25856*****93875&redirect_uri=http://apps.facebook.com/gunlukburcpaylas/&scope=email,read_stream,publish_stream';
echo "<a href='". $url ."'>login</a>";
}
?>
Error: (#100) The post's links must direct to the application's connect or canvas URL.
what i should?
Upvotes: 0
Views: 634
Reputation:
The error appears to tell you all you need to know - you can only post a link to your application's connect or canvas url, not directly to an OAuth dialog.
Upvotes: 1