简体   繁体   English

Facebook REST呼吁使用移动跨平台应用程序

[英]Facebook REST calls for mobile cross-platform app

I am writing some C++ code for a cross-platform app and I would like to know if it's possible to integrate Facebook connection via REST calls to avoid adding the SDKs for each platform and writing native code for each one of them. 我正在为跨平台应用程序编写一些C ++代码,我想知道是否可以通过REST调用集成Facebook连接,以避免为每个平台添加SDK并为每个平台编写本机代码。

I read about the Graph API but I still have a question: When a user presses a "Login with Facebook" button in your app and he is already logged in through the Facebook App, he expects to be logged in automatically. 我阅读了有关Graph API的信息,但仍然有一个问题:当用户在您的应用程序中按下“使用Facebook登录”按钮并且已经通过Facebook应用程序登录时,他希望能够自动登录。 I know the Facebook SDKs (both Android and iOS) do this and read about the Windows Phone Login process , but is it possible to do this directly from C++ to avoid the increase in app size (through the addition of SDKs) and writing pseudo-duplicate code? 我知道Facebook SDK(Android和iOS)都可以做到这一点,并阅读了有关Windows Phone登录过程的信息 ,但是可以直接从C ++做到这一点,以避免应用大小增加(通过添加SDK)并编写伪代码,重复的代码?

The short answer to your question is NO . 对您的问题的简短回答是“ 否” While you can directly access the Facebook API through their REST URLs' (this is documented), the fact is that your app needs to use the Facebook SDK and access the graph API through their Java classes ( GraphUser and Response ) and methods ( executeAsync() and executeAndWait() ) for your app to receive permissions. 虽然您可以通过其REST URL直接访问Facebook API(已记录),但事实是您的应用程序需要使用Facebook SDK并通过其Java类( GraphUserResponse )和方法( executeAsync()executeAndWait() ),以使您的应用接收权限。 This is mentioned in their conditions for approving permissions. 这是在其批准权限的条件中提到的。

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

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