0

使用最初来自 25labs.com 的脚本在多个页面和组中发布。

它正在发布提要,但图片未显示。我很确定有什么东西阻止了图片出现在提要中,因为当我在我的时间线上分享它时,一切都会出现。

我找不到脚本有什么问题。Facebook 正在阻止来自提要的图像。知道如何让图片显示出来吗?

发布信息的表格:

消息:技术实验室..

链接:http: //25labs.com

图片:http: //25labs.com/25-labs.jpg

名称:25个实验室

图片说明:25labs.com

描述: 布拉布拉布拉

部分代码:

if (!$user) {
    // Get login URL
    $loginUrl = $facebook->getLoginUrl(array(
            'scope'   => 'publish_stream,user_groups,read_stream,publish_actions,photo_upload,share_item',
            'redirect_uri' => $site_url,
        ));
}

if ($user) {
    // Proceed knowing you have a logged in user who has a valid session.
    $token = $facebook->getAccessToken();
    //========= Batch requests over the Facebook Graph API using the PHP-SDK ========
    // Save your method calls into an array
    $queries = array(
        array('method' => 'GET', 'relative_url' => '/'.$user),
        array('method' => 'GET', 'relative_url' => '/'.$user.'/groups?limit=5000'),
        array('method' => 'GET', 'relative_url' => '/'.$user.'/likes?limit=5000'),
    );

    // POST your queries to the batch endpoint on the graph.
    try{
        $batchResponse = $facebook->api('?batch='.json_encode($queries), 'POST');
    }catch(Exception $o) {
        error_log($o);

        foreach ($_POST['ids'] as $id) {
            $batchPost[] = array('method' => 'POST', 'relative_url' => "/$id/feed",'body' => http_build_query($body));

            if ($i++ == 50) {
                try{
                    $multiPostResponse = $facebook->api('?batch='.urlencode(json_encode($batchPost)), 'POST');
                    if (is_array($multiPostResponse)) {
                        foreach ($multiPostResponse as $singleResponse) {
                            $temp = json_decode($singleResponse['body'], true);
                            if (isset($temp['id'])) {
                                $splitId = explode("_", $temp['id']);
                                if (!empty($splitId[1])) $list_ids[] = $splitId[0];
                            }elseif (isset($temp['error'])) {
                                error_log(print_r($temp['error'], true));
                            }
                        }
                    }
                }catch(FacebookApiException $e) {
                    error_log($e);
                }

                $flag=0;
                unset($batchPost);
                $i=1;
            }

        }
4

0 回答 0