我希望我的網站比目前具有更好的fb集成。截至目前,我使用以下代碼發佈消息/鏈接到給定用戶的時間表。PHP將自定義應用程序操作發佈到時間線
$attachment = array('message' => 'Predicted the '.ucwords($winning_team_short).' to beat the '.ucwords($losing_team_short).' on '.ordSuffix($new_date_format).'',
'caption' => 'Sportannica - Online Sports Encyclopedia',
'name' => 'How will your predictions pan out?',
'link' => 'http://www.sportannica.com/games/'.$league.'/'.$game.'/predictions',
'description' => ''.ucwords($winning_team_short).' ('.$winning_score.') '.ucwords($losing_team_short).' ('.$losing_score.')',
'picture' => 'http://www.sportannica.com'.$path.''.$winning_team.'.png'
);
$facebook->api('/me/feed/', 'post', $attachment);
我想要一個更好的方法,雖然...一個將消息發佈到用戶的時間軸,就像Spotify這樣的應用程序的方式。
當我打開圖形儀表板時,我定義了幾個自定義動作和對象。一個行動是「預測」。我想讓它的內容是:「。$ fb_user_name。」已經預測到「。$ winning_team。」擊敗「。$ game_date。」上的「。$ losing_team。」。
我對fb api比較陌生,所以當談到這種材料時我有點失落。我知道Spotify的方法使用自定義操作,所以我知道我在正確的道路上。任何人都可以發佈一些示例php代碼發佈消息的方法,該消息利用自定義操作和對象到用戶的時間軸上?
謝謝,
蘭斯
哦~~。那麼,在$ winning_team的頁面中,我需要打開那些打開的圖標記? – Lance
是的,您需要在您發佈的任何頁面上打開圖標。 –
我有以下代碼。並沒有發生。 – Lance