1
require('../wp-blog-header.php');
query_posts('&showposts=-1&order=ASC');
while (have_posts()) : the_post();
$url = the_permalink();
$json = file_get_contents('https://graph.facebook.com/fql?q=SELECT%20like_count,%20total_count,%20share_count,%20click_count,%20comment_count%20FROM%20link_stat%20WHERE%20url%20=%20%27' . $url . '%27');
$json_data = json_decode($json, false);
echo $json_data->data[0]->total_count;
echo '<br>';
endwhile;
上面的代碼,而不是返回總的份額計數,它返回帖子的URL。函數返回發佈的URL而不是檢索Facebook Graph API數據
如何才能讓它返回每個帖子的total_count值?我懷疑6只線需要返回的URL下一行做任務之前,首先..
問候,
謝謝! WordPress的發展網絡
有什麼想法? –