自动发布facebook粉丝页面,粉丝页面名称为PHP SDK 3.2.2

自动发布facebook粉丝页面,粉丝页面名称为PHP SDK 3.2.2,facebook,post,Facebook,Post,我已经在我的facebook粉丝页面上使用了这个代码 <?php // Requires Facebook PHP SDK 3.0.1: https://github.com/facebook/php-sdk/ require ('facebook.php'); define('FACEBOOK_APP_ID',"YOUR-APP-ID"); define('FACEBOOK_SECRET',"YOUR-APP-API-SECRET"); $user = null; $facebo

我已经在我的facebook粉丝页面上使用了这个代码

<?php

// Requires Facebook PHP SDK 3.0.1: https://github.com/facebook/php-sdk/
require ('facebook.php');

define('FACEBOOK_APP_ID',"YOUR-APP-ID");
define('FACEBOOK_SECRET',"YOUR-APP-API-SECRET");

$user = null;

$facebook = new Facebook(array(
    'appId' => FACEBOOK_APP_ID,
    'secret' => FACEBOOK_SECRET,
    'cookie' => true
));

$user = $facebook->getUser(); // Get the UID of the connected user, or 0 if the Facebook user is not connected.

if($user == 0) {

    /**
     * Get a Login URL for use with redirects. By default, full page redirect is
     * assumed. If you are using the generated URL with a window.open() call in
     * JavaScript, you can pass in display=popup as part of the $params.
     * 
     * The parameters:
     * - redirect_uri: the url to go to after a successful login
     * - scope: comma separated list of requested extended perms
     */

    $login_url = $facebook->getLoginUrl($params = array('scope' => "publish_stream"));

    echo ("<script> top.location.href='".$login_url."'</script>");

} else {

    try {
            $params = array(
                'message'       =>  "Hurray! This works :)",
                'name'          =>  "This is my title",
                'caption'       =>  "My Caption",
                'description'   =>  "Some Description...",
                'link'          =>  "http://stackoverflow.com",
                'picture'       =>  "http://i.imgur.com/VUBz8.png",
            );

            $post = $facebook->api("/$user/feed","POST",$params);

            echo "Your post was successfully posted to UID: $user";

        }
        catch (FacebookApiException $e) {
           $result = $e->getResult();
        }

}

?>
但是我需要用我的粉丝页面名在我的facebook粉丝页面上发布,这个scrpit工作得很好,但是这个代码用我的管理员帐户发布在我的粉丝页面上,不像我的粉丝页面


请帮助我:

把你的令牌放在这里:

然后您将找到作为页面发布的访问令牌


希望能有所帮助。

我想你需要仔细看看,我是按照上面提到的步骤做的。

文章被删除了,所以你的答案毫无价值。下次请形成你自己的答案。