使用 FQL 从 Facebook 提取视频表数据
我发现了一些关于使用 FQL 从 facebook 视频表中提取 JSON 数据的不同页面。
这会被视为 Facebook 应用程序吗?
我正在使用 PHP 4 运行 apache 服务器。我的查询如下:
SELECT vid, owner, title, description, thumbnail_link, embed_html, updated_time, created_time FROM video WHERE owner= ***myID****
Facebook 开发人员说 “您可以通过获取 https://api.facebook.com/method/fql.query?query=QUERY。您可以使用格式查询将响应格式指定为 XML 或 JSON参数。”
我应该吗只需做一个
<?
ini_set("display_errors","2");
ERROR_REPORTING(E_ALL);
require 'include/facebook_api.php';
$facebook = new Facebook(array(
'appId' => '******myID********',
'secret' => '******MYSECRET**************',
'cookie' => true,
));
$fql = "SELECT vid, owner, title, description, thumbnail_link, embed_html, updated_time, created_time FROM video WHERE owner= *****FBID*******";
$response = $facebook->api(array(
'method' => 'fql.query',
'query' =>$fql,
));
print_r($response);
?>
包含文件是这样的:https://github。 com/facebook/php-sdk/blob/master/src/facebook.php
我收到以下错误:
stdClass Object ( [error_code] => 190 [error_msg] => Invalid OAuth 2.0 Access Token [request_args] => Array ( [0] => stdClass Object ( [key] => method [value] => fql.query ) [1] => stdClass Object ( [key] => query [value] => SELECT vid, owner, title, description, thumbnail_link, embed_html, updated_time, created_time FROM video WHERE owner= ***************** ) [2] => stdClass Object ( [key] => api_key [value] => ***************** ) [3] => stdClass Object ( [key] => format [value] => json-strings ) [4] => stdClass Object ( [key] => access_token [value] => ***************** ) ) )
任何信息或明确的方向都会很棒。
I have found a few different pages on pulling JSON data from the facebook video table using FQL.
Would this be considered a facebook app?
I am running and apache server with PHP 4. I have the query as:
SELECT vid, owner, title, description, thumbnail_link, embed_html, updated_time, created_time FROM video WHERE owner= ***myID****
Facebook Developer says "You can execute FQL queries by fetching https://api.facebook.com/method/fql.query?query=QUERY. You can specify a response format as either XML or JSON with the format query parameter."
Should I just do a
<?
ini_set("display_errors","2");
ERROR_REPORTING(E_ALL);
require 'include/facebook_api.php';
$facebook = new Facebook(array(
'appId' => '******myID********',
'secret' => '******MYSECRET**************',
'cookie' => true,
));
$fql = "SELECT vid, owner, title, description, thumbnail_link, embed_html, updated_time, created_time FROM video WHERE owner= *****FBID*******";
$response = $facebook->api(array(
'method' => 'fql.query',
'query' =>$fql,
));
print_r($response);
?>
The include file is this : https://github.com/facebook/php-sdk/blob/master/src/facebook.php
I am getting the following error:
stdClass Object ( [error_code] => 190 [error_msg] => Invalid OAuth 2.0 Access Token [request_args] => Array ( [0] => stdClass Object ( [key] => method [value] => fql.query ) [1] => stdClass Object ( [key] => query [value] => SELECT vid, owner, title, description, thumbnail_link, embed_html, updated_time, created_time FROM video WHERE owner= ***************** ) [2] => stdClass Object ( [key] => api_key [value] => ***************** ) [3] => stdClass Object ( [key] => format [value] => json-strings ) [4] => stdClass Object ( [key] => access_token [value] => ***************** ) ) )
Any info or solid direction would be great.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
下面是最终运行的代码。
Below is the code that ended up working.