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

问题描述

我正在尝试使用图形API使用以下代码从Facebook获取user_checkins。

I was trying to get user_checkins from facebook using graph api using the following code

https://graph.facebook.com/".$userId."/checkins?access_token=$accessToken

但是我得到一个空阵列。我已经添加了一些检查到我的时间轴,但这并没有显示在数组中。我已经给出访问令牌的权限。

but I am getting a null array. I have added some checkins to my timeline but that's not showing up in the array. I have given the permissions for the access token.

有人可以帮助我,谢谢提前。

Can someone help me out, thanks in advance.

推荐答案

选项1:在Facebook应用程序版本2.4中,用户签入已被弃用,但我们可以按照以下方式获得他们:

Option 1 : In Facebook app version 2.4 user checkins are deprecated, but we can get them in either following way!


  1. 从您的Facebook应用程序获取user_posts权限

  2. type的值应为status

  3. status_type的值应为mobile_status_update

根据上述第2点和第3点,您可以将条件和获取user_checkins

Based on point 2 and 3 above you can put condition and acquire "user_checkins"

注意:我从桌面上签出了Mobile,而在这两种情况下,status_type是mobile_status_update

NOTE : I checked out from Mobile and Also from desktop and in both case the "status_type" is "mobile_status_update"

选项2:您可以点击下面的图形api查询

Option 2 : You can fire Graph api query like below

me?fields=posts{story,place}

根据地方字段,您可以将条件取得user_checkins

Based on place field you can put condition to acquire "user_checkins"

让我知道如果这是有帮助的话。

let me know if you this is helpful.

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

11-01 15:20