久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Facebook 圖形 API 僅返回某些網站的名稱和 ID

Facebook graph API returns only name and id for some websites(Facebook 圖形 API 僅返回某些網站的名稱和 ID)
本文介紹了Facebook 圖形 API 僅返回某些網站的名稱和 ID的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我開發了一個 WordPress 插件,用于使用 Facebook 進行社交登錄.我正在使用 Facebook 圖形 API /me 來檢索用戶詳細信息.我的問題是,對于某些網站,當安裝了 Facebook 登錄插件時,我只能獲得用戶 ID 和名稱.

I've developed a WordPress plugin for social login using Facebook. I'm using the Facebook graph API /me to retrieve the user details. My problem is that for some websites, when installed a Facebook login plugin, I'm only getting user ID and name.

Array
(
    [name] => John doe
    [id] => 398463877009801
)

但相同的代碼也適用于某些網站.

but same code is working well for some websites as well.

Array
(
    [id] => 398463877009801
    [email] => something@gmail.com
    [first_name] => John
    [gender] => male
    [last_name] => Doe
    [link] => https://www.facebook.com/app_scoped_user_id/398463877009801/
    [locale] => en_US
    [name] => John Doe
    [timezone] => 5.45
    [updated_time] => 2015-05-03T11:24:16+0000
    [verified] => 1
)

僅獲取名稱和 ID 的站點可能出現哪些錯誤?

What might be the possibilities of the errors for the site that is getting only name and id?

推薦答案

正如 CBroe 在上述評論中已經指出的那樣,Facebook API - 比版本 2.4 更新 - 更改了響應和發送請求的方式.

As CBroe already pointed out in the above comment, the Facebook API - newer than version 2.4 - changed the response and the way the requests are being sent.

必須在請求中指定要從圖形 API 返回的每個字段.

例如,如果您希望返回字段 emailname,則必須將它們添加到請求中,如下所示:

For example, if you want the fields email and name returned, you must add them inside the request like this:

/me?fields=email,name

這篇關于Facebook 圖形 API 僅返回某些網站的名稱和 ID的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數組自動填充選擇框)
PHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 從 MSSQL-SELECT 產生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
主站蜘蛛池模板: 欧美日韩一区二区三区在线观看 | 婷婷综合在线 | 一区二区三区高清在线观看 | 中文字幕一区二区三区四区不卡 | 国产一区二区三区视频 | 一级视频在线免费观看 | av中文字幕在线观看 | 午夜精品久久久久久久久久久久久 | 美女久久久久久久 | 99热这里有精品 | 日韩视频在线观看一区二区 | 国产精品一区二区三区在线 | 成人av在线播放 | 久久久做| 99re| 免费看91 | 欧美久久一级 | 日韩在线中文 | 99精品一区二区三区 | 午夜国产| 国产一区二区在线免费视频 | 狠狠色综合久久丁香婷婷 | 国产精品一区久久久久 | 亚洲精品乱码久久久久久按摩观 | 国产精品国产精品国产专区不片 | 97超碰成人 | 夜夜爽99久久国产综合精品女不卡 | 中文字幕免费观看 | 黄色在线观看 | 黄色三级免费网站 | 不用播放器看的av | 中文字幕黄色大片 | 日韩视频一区二区 | 欧美一区2区三区4区公司 | 中文字幕亚洲一区二区三区 | 欧美激情啪啪 | 国产精品欧美日韩 | 99精品视频网 | 狠狠av | 永久免费在线观看 | 午夜精品在线观看 |