天天看點

Unity對接FaceBookSDK

1,注冊Facebook賬号,并添加你的應用

https://developers.facebook.com

2,SDK下載下傳(不建議使用最新版本)

https://developers.facebook.com/docs/unity/downloads/

3,OpenSSl下載下傳(不下載下傳ssl在打包時可能出現錯誤)

https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/openssl-for-windows/openssl-0.9.8e_X64.zip

配置OpenSSl環境變量,重新開機unity

4,配置unity端和facebook develop端 參數

5,開發文檔參考

https://developers.facebook.com/docs/unity/reference/current

6,Facebook登入

請使用測試賬戶登入(未釋出的應用是無法通過非測試賬戶登入)

登入傳回資訊中擷取asses atoken(通過它請求Facebook賬戶的資訊)

7,調用FB.API通過擷取到的atoken擷取使用者的資訊

https://developers.facebook.com/tools/explorer/

(在這擷取請求的位址)

https://developers.facebook.com/docs/facebook-login/permissions/#reference-default

(在這參考權限下可以擷取的資訊)

https://developers.facebook.com/docs/graph-api/using-graph-api/error-handling/

(在這對傳回碼進行分析)

8,IOS與安卓下使用相同

https://developers.facebook.com/docs/unity/getting-started/ios

(iOS接入文檔)

9,報錯解決

https://stackoverflow.com/

(在這,将你的錯誤進行搜尋你能解決大部分問題)

更多unity2018的功能介紹請到paws3d爪爪學院查找。

繼續閱讀