Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5934841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:10:13+00:00 2026-05-22T15:10:13+00:00

I am trying to build an app where I let my registered user be

  • 0

I am trying to build an app where I let my registered user be able to check in to places on Facebook Places. I however for some reason can’t seem to make this work. I assumed this is possible with the Api as write functionality has been added to it, but I couldn’t find an clear explanation on the web. this is what I currently have, after I have asked the user for permission to publish checkins and for user_checkins.

<?php

require("src/facebook.php");


$facebook = new Facebook(array(
'appId'  => 'xxxxxxxxx',
'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'cookie' => true
));



# see if active session
$session = $facebook->getSession();

if(!empty($session)) {

try{
$uid = $facebook->getUser();


$api_call = array(
'method' => 'users.hasAppPermission',
'uid' => $uid,
'ext_perm' => 'publish_checkins'
 );
 $can_post = $facebook->api($api_call);
 if($can_post){



 $facebook->api('/'.$uid.'/checkins', 'POST', array(
   'access_token' => $facebook->getAccessToken(),
   'place' => 'place_id',
   'message' =>'I went to placename today',

   'picture' => 'http://www.place.com/logo.jpg',
   'coordinates' => array(
    'latitude'  => 'lattiude',
    'longitude' => 'lattitude',
    'tags' => $uid,
   )
  )




 );
 echo 'You were checked in';
} else {
 die('Permissions required!');
}
} catch (Exception $e){}
  } else {
# There's no active session,generate one
$login_url = $facebook->getLoginUrl();
header("Location: ".$login_url);
}

?>

The code works when I change it ‘checkins’ to ‘feed’. Is there something wrong with my code or am I trying to do somethign that isn’t possible (or do it the wrong way).

Any help will be greatly appreciated as I already spent quite a significant amount of time trying to fix this, but I just can’t seem to make it work.

Best regards,

Marcus Joe

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T15:10:14+00:00Added an answer on May 22, 2026 at 3:10 pm

    Your answer is almost correct.

    $facebook->api('/'.$uid.'/checkins', 'POST', array(
    'access_token' => $facebook->getAccessToken(),
    'place' => 'place_id',
    'message' =>'I went to placename today',
    'picture' => 'http://www.place.com/logo.jpg',
    'coordinates' => json_encode(array(
       'latitude'  => 'lattiude',
       'longitude' => 'lattitude',
       'tags' => $uid),
     )
    )
    

    Notice that for coordinates you have to supply a json_encode variable.
    Hope that helps someone.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying build an App Engine connected Android application and am having some problems
I'm trying to build an app that gets JSON from server and then shows
I am trying to build an app which has lot of content to be
I'm trying to build an app using Sinatra, Ruby, rack, haml, pony and SendGrid,
I'm trying to build my app on my iPhone 4 but i keep getting
I am trying to build an app in which I want to trigger a
I'm trying to build an app where I have a TabBarController with 4 entries.
I am trying to build an app that only works for landscape device orientations
I am trying to build an app with backend on Google App engine. It
I am trying to build an app (with ARC) that uses the facebook_ios_sdk (the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.