Can one find out login and logout times on Facebook? - facebook

Through any Facebook API, is there a way to
obtain the login/logout times for a user?
track when a user is logged in?
Basically, I want to calculate how long a user has been logged into Facebook for a Facebook application. I plan to program in PHP.

You can not get this data through Facebook directly. The closest thing you could do was see the last time he was "active" aka posted something, changed something etc.

Related

Is there a way to check if a user is still fan of my page?

I currently am making a list of my fans who communicated with my page and I store their data in a personal database. But now I was wondering if there is a way to see if a user is still fan of my page.
Example: A user likes my page and posts something on my wall. 2 weeks later, the same user unlikes my page and I update my fan database. I will still get his name in the query because he once posted a message on my wall. Any solutions or ideas?
Note: The user does not need to login to an application or give permissions.
No, there is no way to check if a user is a fan of your Page. The user would have to authorize an App with user_likes, and you would not get that permission approved just for checking the like status.

perl Facebook::Graph API check if user likes page

I'm using Facebook::Graph and any time a page is loaded, I would like to detect server-side if a user has liked a certain page or not. I can't find in the documentation how to do this though. Is it possible to do this without sending the user ID to my server-side script? Because I know using the javascript SDK you can check this, but I feel like it might be different with a server-side API.
Not sure what you mean with "anytime a page is loaded"... I guess you mean an page of an App? If so, you need the user_likes permission to be able to get the information on the User's likes.
If you're using a Page Tab App, then you could get this info out of the signed_request which is passed to the App once the User accesses it from the Facebook Page Tab. See https://developers.facebook.com/docs/reference/login/signed-request/ The indicator is in the page.liked field.

Is Scheduling Posts Permitted By Facebook?

Im toying around with integrating facbook into a website. Basically this website will generate acheivements for each user after X amount time (starting from a day up to a year).
I want to post these milestones to facebook automatically (with users prior permission). Does facebook allow this?
This article seems pretty darn explicit that its not.
But i have seen lots of posts on SO that are scheduling posts while trying to figure this out. Perhaps i have terminology's mixed up or something. Could someone explain this for me please.
If its not possible, does this mean that the only time an app can post to a users facebook wall is when the user explicitly clicks something to the effect of "post to my wall". Meaning they would need to login and manually approve every milestone?
Thanks
No, it's not possible to post something on behalf of a user automatically. According to the facebook's policy, even if a user grants you a publishing permission, actions you take on the user's behalf must be expected by the user, i.e. user must be aware of the actions you are taking on his behalf. As the article says, this can be done, for example, by prompting user with a dialog box with a link to Share a photo to their timeline each time your app would like to share to the user’s Stream.
Facebook however permits scheduled Page posts, but I guess this is not what you want. You can read more about it here.

Getting Last Login Time Of Facebook User

In my Facebook app, I want to know users login history. Is there any way by which I can get information about when the user was last logged in on Facebook (on Facebook, not on my app) ?
I studied the Facebook Graph API and tried to get user information using $Facebook->api('/me');, and referring to user object of Graph API, but nowhere could I find information related to user's login history.
Does Facebook not provide user's login history details ? Or do I need to follow a different approach ? Any help would be appreciated.

Facebook connect and share application for website (like 9gag)

I'm creating a website where users can make reservations on certain restaurants, I want the whole page to be integrated with Facebook since you log in. And when the user makes a reservation Facebook will automatically post the reservation on the users Facebook so other may see it in their home page (just like an activity of 9gag).
Any help please!! I'm a programmer but it's the first time I try to integrate Facebook.
If you start with Facebook, this is where you should go:
https://developers.facebook.com/docs/
For login:
https://developers.facebook.com/docs/concepts/login/
Also read the terms and conditions of facebook, there are some important rules for apps.