嗨我需要所有的facebook检查数据,但我没有找到任何
解决这个问题
我正在使用这个
https://graph.facebook.com/v2.3/me/locations?access_token= $的access_token
https://graph.facebook.com/v2.3/me/checkins?access_token= $的access_token
但收到
{ "error": { "message": "(#12) checkins API is deprecated for versions v2.0 and higher", "type":
" OAuthException"," code":12}}
请给我替换溶液以获取facebook checkin
答案 0 :(得分:2)
已弃用,没有其他选择。签到不再存在直接API,您只能通过包括一个地方签到一个墙贴。
答案 1 :(得分:1)
大家好,
我为此找到了另一种解决方案
请使用此图表api
https://graph.facebook.com/v2.3/me/tagged_places?access_token= $的access_token
$ json_locations
=的file_get_contents( “https://graph.facebook.com/v2.3/me/tagged_places?access_token= $的access_token”);
$ locations = json_decode($ json_locations,TRUE);
foreach($ locations ['data'] as $ key => $ jsons){
if(!isset($ jsons ['status'])){$ jsons ['status'] =' - '; }
if(!isset($ jsons ['place'] ['id'])){$ jsons ['place'] ['id'] =' - '; }
if(!isset($ jsons ['place'] ['name'])){$ jsons ['place'] ['name'] =' - ';
} if(!isset($ jsons ['place'] ['location'] ['city'])){
$ jsons [ '地方'] [ '位置'] [ '城市'] = ' - '; }
if(!isset($ jsons ['place'] ['location'] ['country'])){
$ jsons [ '代替'] [ '位置'] [ '国家'] = ' - '; }
if(!isset($ jsons ['place'] ['location'] ['latitude'])){
$ jsons [ '代替'] [ '位置'] [ '纬度'] = ' - '; }
if(!isset($ jsons ['place'] ['location'] ['longitude'])){
$ jsons [ '代替'] [ '位置'] [ '经度'] = ' - '; } $ type ='checkin';
$ checkin_id = mysql_real_escape_string($ jsons [ '代替'] [ 'ID']);
$名称= mysql_real_escape_string($ jsons [ '代替'] [ '名称']);
$城市= mysql_real_escape_string($ jsons [ '代替'] [ '位置'] [ '城市']);
$国家= mysql_real_escape_string($ jsons [ '代替'] [ '位置'] [ '国家']);
$纬度= mysql_real_escape_string($ jsons [ '代替'] [ '位置'] [ '纬度']);
$经度= mysql_real_escape_string($ jsons [ '代替'] [ '位置'] [ '经度']); // echo“update set user_registeration
latitude ='$ latitude',longitude ='$ longitude'在哪里
face_book_id ='$ id'“; if($ type =='checkin'|| $ type =='status'){
$ check = mysql_query(“select * from fb_checkins where
facebook_id ='$ facebook_id'和type ='$ type'和name ='$ name'和
checkin_id ='$ checkin_id'“)或死(mysql_error());
if(mysql_num_rows($ check)> 0){$ fetch1 = mysql_fetch_assoc($ check);
$ ID = $ fetch1 [ 'ID']; $ delete = mysql_query(“从fb_checkins删除
其中id ='$ id'“); $ sql = mysql_query(”insert into fb_checkins set
facebook_id = '$ facebook_id',名字= '$名字',checkin_id = '$ checkin_id',类型= '$类型',城市='$城市,国家= '$国家',北纬= '$纬度',东经= '$东经'“)
或者死(mysql_error());
} else {$ sql = mysql_query(“插入fb_checkins设置 facebook_id = '$ facebook_id',名字= '$名字',checkin_id = '$ checkin_id',类型= '$类型',城市='$城市,国家= '$国家',北纬= '$纬度',东经= '$东经'“) 或死(mysql_error()); }}