[英]Facebook Hashtag feed PHP cURL
如何使用Facebook Graph API獲取Facebook主題標簽提要? 我想獲取特定#HashTag的所有帖子。
我嘗試了以下代碼:
<?php
$keyword = '#TagName';
$graph_url = "https://graph.facebook.com/search?type=post&access_token=xxx&q=$keyword";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $graph_url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);
var_dump($result);
?>
但是它返回一個錯誤:
string(82) "{" error":{"message":"No node specified","type":"GraphMethodException","code":100}}"
授予的權限:read_stream
有什么解決辦法嗎? 謝謝
您無法使用API檢索主題標簽供稿,除非您正在使用Facebook Trending API(您將無法訪問它)
https://developers.facebook.com/docs/graph-api/reference/v2.3/hashtag
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.