【问题标题】:How to get Facebook checkin using Facebook Graph API or any other method如何使用 Facebook Graph API 或任何其他方法获取 Facebook 签到
【发布时间】:2016-02-07 06:46:11
【问题描述】:
  1. 您好,我需要所有 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 签入的替代解决方案

【问题讨论】:

    标签: facebook-graph-api


    【解决方案1】:

    它已被弃用,没有其他选择。签到不再存在直接 API,您只能通过包含一个地点的墙帖进行签到。

    【讨论】:

    • 如何查询你的facebook页面的所有签到?
    【解决方案2】:
    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['place']['location']['city']='-'; } if(!isset($jsons['place']['location']['country'])) { $jsons['place']['location']['country']='-'; } if(!isset($jsons['place']['location']['latitude'])) { $jsons['place']['location']['latitude']='-'; } if(!isset($jsons['place']['location']['longitude'])) { $jsons['place']['location']['longitude']='-'; } $type='签到'; $checkin_id=mysql_real_escape_string($jsons['place']['id']); $name=mysql_real_escape_string($jsons['place']['name']); $city=mysql_real_escape_string($jsons['place']['location']['city']); $country=mysql_real_escape_string($jsons['place']['location']['country']); $latitude=mysql_real_escape_string($jsons['place']['location']['latitude']); $longitude=mysql_real_escape_string($jsons['place']['location']['longitude']); //echo "更新设置用户注册 纬度='$latitude',经度='$longitude' face_book_id='$id'"; if($type=='checkin' || $type=='status') { $check=mysql_query("select * from fb_checkins where facebook_id='$facebook_id' and type='$type' and name='$name' and 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 中删除 where id='$id'"); $sql=mysql_query("插入到 fb_checkins 集合中 facebook_id='$facebook_id',name='$name',checkin_id='$checkin_id',type='$type',city='$city',country='$country',latitude='$latitude',longitude ='$经度'") 或死(mysql_error());

      } else { $sql=mysql_query("插入 fb_checkins 集合 facebook_id='$facebook_id',name='$name',checkin_id='$checkin_id',type='$type',city='$city',country='$country',latitude='$latitude',longitude ='$经度'") 或死(mysql_error()); } } }

      1. 列表项

    【讨论】:

      猜你喜欢
      • 2014-10-25
      • 2011-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-10
      • 2012-02-08
      相关资源
      最近更新 更多