Facebook graph api search results depends on location?

后端 未结 2 1243
萌比男神i
萌比男神i 2021-01-02 20:51

I\'ve tried to fetch results using Graph search API and I\'ve notice that the results when executed in my computer (Argentina) are different from the results when I run it i

2条回答
  •  Happy的楠姐
    2021-01-02 21:23

    I don't know exactly which results are different and which skd version you are using, but one possible approach is to send the accept-language header with the cURL request. In the facebook api php file add the following line in the function makeRequest() below $opts = self::$CURL_OPTS;

    $opts[CURLOPT_HTTPHEADER] = array('Accept-Language: en-us,en;');
    

    This post is almost two years old: Get Facebook Graph API results in English

    Actually, this issue should have already been solved: Return values from the graph-api depend on geographic server location

提交回复
热议问题