Facebook - Publish Checkins using PHP SDK/JavaScript SDK

前端 未结 2 1956
南旧
南旧 2021-01-16 01:16

I\'m trying to publish checkin using Facebook Graph API. I\'ve gone through Facebook API documentation (checkins) and also have the publish_checkins permission.

2条回答
  •  粉色の甜心
    2021-01-16 01:36

    Apparently, the configuration and the PHP checkin function that I have posted in the question are correct. However, I should use JavaScript SDK instead of PHP SDK for my case as pointed out by Nehal. For future references...

    Using JavaScript SDK

    function checkin()
    {
        FB.api('/me/checkins', 'post', 
        { message: 'MESSAGE_HERE',
           place: 165122993538708,
           coordinates: {
               'latitude': 1.3019399200902,
               'longitude': 103.84067653695
           }
        },
            function (response) {
                alert("Checked in!");
            }
        );
    }
    

提交回复
热议问题