Đang Thực Hiện

facebook app to publish actions

Looking for experienced developers to fix the issues mentioned below in a php facebook application to publish user action on timeline along with tagging people/page if possible

When I click on submit for facebook approval, I get below message.

"Publish Actions

You must publish at least one action to your Timeline using this action type. Review the documentation."

Need help with below code.

require_once '/libraries/facebook-php-sdk/src/[url removed, login to view]';

$config = array(

'appId' => '***********',

'secret' => '*************',

);

$facebook = new Facebook($config);

$user_id = $facebook->getUser();

if($user_id) {

/* $attachment = array(

'link' => '[url removed, login to view]',

'message' => 'Posting with the PHP SDK!'

);

*/

$attachment = array(

'video' => '[url removed, login to view]',

'message' => 'Test message',

);

/*

array( 'message' => 'The status header',

'link' => '[url removed, login to view]',

'picture' => '[url removed, login to view]',

'name' => 'Name of the picture, shown just above it',

'description' => 'Full description explaining whether the header or the picture' ) );

*/

// We have a user ID, so probably a logged in user.

// If not, we'll get an exception, which we handle below.

try {

//$ret_obj = $facebook->api('/me/feed', 'POST', $attachment );

$ret_obj = $facebook->api('testnamespace:watch', 'POST', $attachment );

echo '<pre>Post ID: ' . $ret_obj['id'] . '</pre>';

} catch(FacebookApiException $e) {

// If the user is logged out, you can have a

// user ID even though the access token is invalid.

// In this case, we'll get an exception, so we'll

// just ask the user to login again here.

$login_url = $facebook->getLoginUrl( array(

'scope' => 'email, publish_actions'

));

print 'Please <a href="' . $login_url . '">login</a>';

error_log($e->getType());

error_log($e->getMessage());

}

// Give the user a logout link

echo '<br><a href="' . $facebook->getLogoutUrl() . '">logout</a>';

} else {

// No user, so print a link for the user to login

// To post to a user's wall, we need publish_stream permission

// We'll use the current URL as the redirect_uri, so we don't

// need to specify it here.

$login_url = $facebook->getLoginUrl( array( 'scope' => 'email, publish_actions' ) );

print 'Please <a href="' . $login_url . '">login</a>';

}

Kỹ năng: Quảng cáo trên Facebook, PHP

Xem thêm: must publish action timeline using action type, facebook php sdk publish action, facebook app publish action, publish action app facebook, publish action using php sdk facebook timeline, facebook publish_actions php, facebook login publish_actions example php, php facebook publish action, facebook php publish actions, publish_actions php sdk, facebook publish user action, publish action facebook, must publish action timeline using action type review, facebook review publish actions, publish actions example, publish action facebook api php, access token publish_actions facebook, facebook php sdk publish_actions, facebook php publish action, your email is invalid facebook, www developers facebook com, video app developers, submit your feed, submit video url, sdk facebook php

Về Bên Thuê:
( 6 nhận xét ) Harrison, United States

Mã Dự Án: #1630059

3 freelancer đang chào giá trung bình $150 cho công việc này

MakedonApps

Easy to fix. pm

$50 USD trong 1 ngày
(13 Đánh Giá)
4.8
prolanzer

Ready to start. PM sent

$200 USD trong 5 ngày
(16 Đánh Giá)
4.5
habiburcsesust

Hi We have seen your project requirement. We can do it easily. We are expert on HTML, Javascript, MySQL, PHP ,AJAX,Jquery ,Payment Api ,Facebook Api etc. thanks.

$200 USD trong 5 ngày
(0 Đánh Giá)
3.1