简体   繁体   English

如何将Facebook与android应用程序集成?

[英]how to integrate the Facebook with android application.?

Am successfully created the application in facebook and got the application ID 我在Facebook中成功创建了应用程序并获得了应用程序ID

 compile 'com.facebook.android:facebook-android-sdk:4.7.0'

and i compile this for android SDK, Main problem am facing is FaceBook class is not including showing cannot resolve symbol 'Facebook' 我为android SDK编译了这个文件, 面临的主要问题是FaceBook类不包括显示无法解析符号“ Facebook”的问题

any one can help me how to include android SDK, and with simple program. 任何人都可以帮助我如何包括android SDK,以及简单的程序。

Have a look at the Facebook Developer information, eg the Login button, found here: https://developers.facebook.com/docs/facebook-login/android 查看Facebook开发人员信息,例如“登录”按钮,可在以下位置找到: https : //developers.facebook.com/docs/facebook-login/android

This should help you out. 这应该可以帮助您。

当前的Facebook sdk版本将其添加到应用gradle和synchr中

compile 'com.facebook.android:facebook-android-sdk:4.10.0'

I think facebook class is changed to the new facebook SDK. 我认为facebook类已更改为新的facebook SDK。 You can visit to this link... https://developers.facebook.com/docs/reference/android/3.0/class/Facebook/ 您可以访问此链接... https://developers.facebook.com/docs/reference/android/3.0/class/Facebook/

and you will show the message as 'This class is no longer available in the most recent version of the SDK'. 并且您将显示消息为“该类在最新版本的SDK中不再可用”。

Delete Facebook class and try to integrate SDK using facebook guideline https://developers.facebook.com/docs/android/getting-started/ 删除Facebook类,并尝试使用Facebook指南https://developers.facebook.com/docs/android/getting-started/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM