简体   繁体   English

您知道我如何使用PHP对Facebook应用进行身份验证吗?

[英]Do you know how I can authenticate an app for Facebook in PHP?

I'm trying to to get tokens so something like that so that an app will be able to search a user in Facebook. 我正在尝试获取令牌之类的东西,以便应用程序能够在Facebook中搜索用户。

I've tried http://github.com/facebook/php-sdk but it is either for authenticating a user or it is not working. 我已经尝试过http://github.com/facebook/php-sdk,但是它要么用于验证用户身份,要么不起作用。

For example this one is for authenticating a user to the app http://github.com/facebook/php-sdk/blob/master/examples/example.php but I want to authenticate my app to facebook. 例如,这是用于对应用程序http://github.com/facebook/php-sdk/blob/master/examples/example.php的用户进行身份验证,但我想对Facebook进行身份验证。

This one give error http://github.com/facebook/php-sdk/blob/master/tests/tests.php Fatal error: Class 'PHPUnit_Framework_TestCase' not found in... 致命错误:找不到错误类“ PHPUnit_Framework_TestCase” ... http://github.com/facebook/php-sdk/blob/master/tests/tests.php

And I do not know my ap's tokens. 而且我不知道我的AP令牌。 Also I do not know whether those tokes are used for once or they can be used multiple times. 另外,我也不知道这些通行证是一次性使用还是可以多次使用。

You can only access the email addresses (or proxy email addresses) of the users that gave your app that permission. 您只能访问向您的应用授予该权限的用户的电子邮件地址(或代理电子邮件地址)。 There is no way to write a facebook application that accesses email addresses (or most any data) of arbitrary users. 无法编写访问任意用户的电子邮件地址(或大多数数据)的facebook应用程序。

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

相关问题 现在如何在 Facebook 的 PHP SDK 3.0.0 中进行身份验证? - Now how do I authenticate in Facebook's PHP SDK 3.0.0? PHP和多重继承; 我知道你不能,但那我该怎么办? - PHP and multiple inheritance; I know you can't, but then how do I..? 我怎么知道我的应用程序正在Facebook内运行 - How do I know my app is being Run inside Facebook Facebook PHP SDK –如何知道我是否需要$ facebook-> getUser()? - Facebook PHP SDK – how do I know if $facebook->getUser() is the user I need? 如何为我的facebook应用程序验证用户身份,然后为他们发布到他们的墙上? - How do I authenticate a user for my facebook app and then post to their wall for them? 我如何使用Facebook PHP SDK登录而不必重新进行身份验证? - How do I log in using facebook PHP SDK without having to re-authenticate? 如何在PHP / MySQL中验证用户? - How do I authenticate a user in PHP / MySQL? 如何使用 PHP 对 Jira API 进行身份验证 - How do I authenticate for Jira API with PHP 你知道为什么我无法在浏览器上访问我的 php 文件但可以访问文件夹吗? - Do you know why I can't access my php file on my browser but can access the folders? 如何在Facebook-PHP-SDK中授权应用 - How do I authorize a app in Facebook-PHP-SDK
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM