从Facebook API搜索 [英] Search from Facebook API

查看:135
本文介绍了从Facebook API搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个仍然工作正常的测试服务器上实现了从Facebook api V2.0发布的搜索。
但是将代码转移到客户端服务器并注册了该URL的新应用程序。
它给出结果

  stdClass对象

[error] => stdClass对象

[message] =>(#11)Post search已被弃用
[type] => OAuthException
[code] => 11


在之前的测试应用程序仍然工作。
如果post搜索被弃用,那么它不应该在两者上都有效。我没有得到,如果我在应用程序或什么中缺少一些设置。

解决方案

在此之前我遇到同样的问题。


对于2014年4月30日之前创建的应用程序,不用
指定版本号的API调用相当于调用API的1.0版。



对于2014年4月30日当天或之后创建的应用程序,不需要
指定版本号的API调用就相当于调用API的v2.0。
这些应用程序将无法调用API的v1.0。


https://developers.facebook.com/docs/apps/upgrading


$ b $事实上,我试着用今天创建的一个新应用程序。我通过在30/04/2014之前创建的应用程序的ID和密钥解决了这个问题。



对于v2:
公开发布搜索是否更长的可用。 (/ search?type = post& q = foobar)


I implemented the post search from Facebook api V2.0 on a test server which is still working fine. But when shifted the code to client server and registered a new app for that url. It gives the result

stdClass Object
(
    [error] => stdClass Object
        (
            [message] => (#11) Post search has been deprecated
            [type] => OAuthException
            [code] => 11
        )
)

On previous app of test it is still working. If the post search is deprecated then it should not work on both. I'm not getting if i'm missing some settings in app or what.

解决方案

I encountered the same problem, before this post.

For apps created before April 30th 2014, making API calls without specifying a version number is equivalent to calling v1.0 of the API.

For apps created on or after April 30th 2014, making API calls without specifying a version number is equivalent to calling v2.0 of the API. These apps won't be able to call v1.0 of the API.

https://developers.facebook.com/docs/apps/upgrading

In fact, I tried with a a new app created today. I solved this problem by taking the ID and the key of an app created before the 30/04/2014

For the v2: Public post search is no longer available. (/search?type=post&q=foobar)

这篇关于从Facebook API搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆