2013-10-14 46 views
4

Facebook上有這個新的縮略圖視圖(參見本文後面的圖片)。但是,每一個命令或財產我想,我永遠不會與API發佈的時候得到這個...Facebook API文章:如何獲得更大的縮略圖?

這是怎麼我的事件後看起來像現在:

$status = $facebook->api('/me/feed', 'POST', array('access_token' =>  $page_access_token, 'fields' => 'picture.height(960).width(1833)', 'message' => $text, 'icon' => 'http://www.renoi.de/images/lg.jpg', 'link' => $link, 'name' => $title, 'user_generated' => 'true', 'images[0]' => $pic2, 'source' => $pic2, 'height' => '960', 'width' => '1833')); 

這是OG:圖像線該FB需要手動發帖:

<meta property="og:image" content="<?php echo $og_image; ?>" /> 

請相信我,$ og_image和$ PIC2是完全一樣的網址,沒有縮略圖,全程質量,遠遠超越720P。

我很高興在這個問題上的任何輸入是不是「使用?類型=大」或某事。像那樣。

enter image description here

+0

創建新標籤「縮略圖」需要至少1500點。 GTFO! -..- – Lightningsoul

+0

根據FB開發人員小組的一些討論,似乎只有通過FB.ui(或直接在Facebook上)發佈的帖子才能獲得更大的圖像 - 但通過API創建的帖子卻沒有。 (它們似乎在目標牆上顯得很大,但在進給中仍然很小。) – CBroe

+0

是的,那正是問題所在。所以沒有解決方法? :( – Lightningsoul

回答

0

這是固定的與服務器上的設計更新immenent(我使用的是測試服務器,所以我看到的東西更早)。

最後,謝謝Facebook!

thumbnails in full width in fb api posts

+0

你能告訴如何做這樣的縮略圖? – lostboy

+1

它是自動拉如果你的信號源圖像大足以讓它生成更大的縮略圖。 – Lightningsoul

1

所以現在這是不可能的,我使用一個替代方案來令人沮喪,因爲它可能是API來做到這一點。這是我內容左側的分享按鈕系統。

Facebook上的結果可以在這裏看到(實際上是很酷的,因爲它改變更多成果轉化爲對方): http://lightningsoul.com/media/img/screenshot/likes_on_facebook_share_content.png

// Will get your actual browser address and share it 

<?php  $thisadress = $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?> 

<div id="fblikem"> 
     <!-- AddThis Button BEGIN --> 
     <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> 
     <a class="addthis_button_preferred_1" addthis:url="<?php echo $thisadress; ?>"></a> 
     <a class="addthis_button_preferred_2" addthis:url="<?php echo $thisadress; ?>"></a> 
     <a class="addthis_button_preferred_3" addthis:url="<?php echo $thisadress; ?>"></a> 
     <a class="addthis_button_preferred_4" addthis:url="<?php echo $thisadress; ?>"></a> 
     <a class="addthis_button_compact" addthis:url="<?php echo $thisadress; ?>"></a> 
     <a class="addthis_counter addthis_bubble_style" addthis:url="<?php echo $thisadress; ?>"></a> 
     </div> 
    </div> 
//And the CSS to make it stay on the left side of your content (centered 1280px wide) 
#fblikem_vertical 
{ 
    position: fixed; 
    top: 50%; 
    left: 50%; 
    height: 200px; 
    width: 100px; 
    margin-left: -715px; 
    margin-top: -100px; 
    z-index: 1000; 
} 

希望FB會在某個時候解決這個問題。如果是這樣,我當然會在這裏通知你。

-1

這段代碼可以工作非常適合我:

$appid = 'xxxxxxx'; 
$appsecret = 'xxxxxxxx'; 
$pageId = $pageid;  
$msg = $title; 

$title = $facebook_title; 

$uri = $url; 

$desc = $intro_text; 

$pic = $todir; 

$action_name = 'Go to 1tvnews'; 

$action_link = $url; 

$facebook = new Facebook(array(
'appId' => $appid, 

'secret' => $appsecret, 

'cookie' => false, 
)); 

$user = $facebook->getUser(); 

// Contact Facebook and get token 

if ($user) { 

// you're logged in, and we'll get user acces token for posting on the wall 

try { 

$page_info = $facebook->api("/$pageId?fields=access_token"); 

if (!empty($page_info['access_token'])) { 

$attachment = array(

'access_token' => $page_info['access_token'], 

    'message'=> $msg, 

'from' => $appid, 

'to' => $pageid, 

'caption' =>'1tvnews.af', 


'name' =>$facebook_title , 

'link' => $uri, 

'picture' => $todir2, 
      'description' => $intro_text 
); 

$status = $facebook->api("/$pageId/feed", "post", $attachment); 

} 
else 
{ 
$status = 'No access token recieved'; 
} 
} catch (FacebookApiException $e) { 
error_log($e); 
$user = null; 
} 
} 
else 
{ 
// you're not logged in, the application will try to log in to get a access token 

header("Location:{$facebook->getLoginUrl(array('scope' => 
'photo_upload,user_status,publish_stream,user_photos,manage_pages'))}"); 
} 
相關問題