Facebook login user/page identifier - facebook

Sorry to ask this but browsing the awful Facebook documentation I cannot see the obvious - may to too obvious.
I have a FB application for users to put on their page OK, simple enough etc. but the one thing I cannot find is how to identify the page owner rather than a page visitor. BY page owner I mean the person who installs the application.
e.g. application name - mytestFBapplication.
You (reader of this question) install the application on your FB page.
All other readers of this question (not you) can visit the page
But as said how do I identify if it is you or me visiting your page. Reason is if it is you I want to show an admin button and if it is me - guess what, not show the admin button. For some reason, as said may be obvious and I have missed it somewhere I cannot see this answered anywhere in the facebook documentation.
Thanks in advance

FQL isAdmin
http://developers.facebook.com/docs/reference/fql/page_admin/
Old REST API isAdmin
http://developers.facebook.com/docs/reference/rest/pages.isAdmin/
Legacy FBML isAdmin edit Header
http://developers.facebook.com/docs/reference/fbml/page-admin-edit-header/

Related

Cookies that can remember facebook users who liked

I am fresh and making a plugin pop up facebook like box from sketches so please can any body guide me, how I can use cookies to detect if user has already like my facebook page, and don't show the box to him other wise if he hasn't like the page show it.
I think you're heading in a wrong direction. I guess what you want to implement is a so-called "Fan Gate". This was already answered a lot of times here on SO, for example see perl Facebook::Graph API check if user likes page
If you're using a Page Tab App, this is the way to go. Otherwise you'll be having problems to determine whether the specific user has liked you page or not, because you don't have the user_likes permission, which is necessary to get this info.

How do I make sure someone likes my facebook page before entering contest?

I plan to start a Facebook contest where the user is first asked to like the page, then they submit their email to enter the contest.
I checked out other contest examples on:
http://contests.about.com/od/facebookcontests/tp/Facebook-Contests-and-Facebook-Sweepstakes.htm
Most Facebook pages direct a user to a "Like this page to continue" page. I tried to google around to find how this is done, but I cannot find anything. I tried to find ways to track specific user's likes,
For contest-specific legal reasons, I cannot use an app that makes the contest and keeps track of the entries. So I will need to create this from scratch.
I have made other apps before, and I do have access to an external server where I plan to create a page and link to it from facebook for the 'frame' type app.
Is there a standard way of doing this? Is there a documentation that I have yet to find?
Thanks
(Me answering my own question)
Some more googling I was able to find:
How to check if current facebook user like a page using PHP SDK?
A php version of the same question.
In that case, I will be able to check out FQL's documentation to find out how to get this information.
I really don't want a permission popup from facebook to pop up, and I don't think I will need that to make this work. I will try that and add a comment to this answer if it works just like what I'm looking for.

Is Fan of Facebook Page?

Please take a look on this tab on this Facebook Page
http://www.facebook.com/HotelGuru.sk?sk=app_233066690095330
My question is how is it possible that the app on the tab knows if I liked a fan page, because when I like it, the tab changes its content.
The Signed Request conatins data if the user is an admin of the page and/or a liked the page (which is akin to fan).
Signed Request Facebook
Similar question with the coding examples here Facebook's pages.isfan requires user id
You didn't say what language you are using so I am intentionally leaving this quite vague as there is little point doing an example that is irrelevant.
EDIT: This page has some examples for server and client workflows, which are quite good http://www.masteringapi.com/tutorials/facebook-api-check-if-a-user-is-fan-of-a-facebook-page/20/

Problem with like it button and public permissions

I'm a web developer and i'm having problems using the "like it" button
I put the buttom on my site as a counter of votes of a special contest. People can only click the like buttom if they are fan of my Facebook page.
The problem is that people can't vote if they haven't public permissions on his facebook, cause i can't know if they are or not fans of my page.
Is there a solution?
if you rely on information that you are not certain that you can obtain then sadly there is no solution.
Since what you are doing is beyond a simple like button What you may want to try is open a facebook application and request from your users the user_likes permission. You can read more about it here. I have photo albums on the "highest privacy setting" - only me. Yet when I request a list of my photo albums through one of my applications (with the required permissions of course) I get back ALL of my albums.. This might have been a temporary issue that was solved - but in any case - I saw this behavior and I thought it might be relevant to this post :)
Additionally you should look at the Promotions Guidelines specifically this point :
You must not use Facebook features or functionality as a promotion’s registration or entry mechanism. For example, the act of liking a Page or checking in to a Place cannot automatically register or enter a promotion participant.
I had some problems with facebook on this issue - you are not allowed to require someone to "like" a page in order to participate in an activity that is not directly connected to that page.
From what I understand you are requireing people to like your page on facebook beofore voting on your site... If this IS the case then facebook might very well start taking action and closing your page/app.

getting logged-in user's details on another user's facebook profile tab

I have a Facebook application that has a user profile tab. The specs of the app dictate that the layout of the profile tab should be different depending on whether a user is looking at their own profile, or someone else is looking.
Whenever I try to print_r FB's signed request details, the profile_id is always the same as the user_id, even if I am looking at the profile as another user.
Is there another way I can get this information, or is it not possible using Facebook's current setup?
Thanks!
Facebook sends visitor id only after they interact with your tab in some way, but not during the first visit.
In theory the Canvas signed_request functionality is meant to solve this issue too, but I'm having the same issue around the user needing to interact with the tab first.
Personally, I think that's stupid with respect to signed_request functionality, as it looks like I need to request permissions I don't need in order to get it to do what I thought the purpose of the functionality change was (see #3362040 for an example).
Griping aside, though, you might find the signed_request functionality helpful for this.