Reaching users of facebook app - facebook

I have a web app that is connected to facebook graph, and thus have a corresponding facebook app. I'm looking for a means of communicating with the users of my app through their facebook feed.
So far I've asked the users to like the facebook application profile page for my app, so that when I post news on that wall, the users get it. This causes some confusion since the application profile page is a bit of a peripheral component in the webapp-facebook relationship.
Ideally I would be able to post on facebook either as the app, so that I reach all the registered users, or as the app url (www.myapp.url) so that users who like that url will get the posts. Alternatively somehow link the application profile page and the url/app, so that likers of the url or users of the app get the profile page posts.
Note that I'm not looking to post to users walls (just their feeds) and I'd prefer to post manually, using facebooks interface for posting.

The only ways you can publish into a user's news feed is to use a Facebook Page or a Facebook Open Graph Object. So, you did right by asking users to like your Facebook Application Page. If you've also got a webpage that people like, you can turn that webpage into an Open Graph object by adding an fb:app_id or fb:admins meta tag to the head of the page. Doing this grants you access to publish to your fans' news feeds, and you get access to a Facebook page-like interface (for administration purposes only). You can publish to the user's feed using this feed publisher (just like you would do if your Graph object were any other Facebook Page).
To get to the admin page you just have to make sure your Facebook User ID is in the fb:admins meta tag. Once it is, visit a like button social widget for that object, and you'll get the a link that lets you go to the admin page for the object.
I hope that's clear. You should probably give the Open Graph Protocol Documentation a good read.

Related

Facebook: Share story without adding link to resource

I would like to make users to be able to post stories to their timeline but with no links to any resources. Using Facebook example:
I would like this post not to have any links. If someone using facebook on a browser clicks the image or the Cookie! title, they will be redirected somewhere. In my case, they are directed to an URL on my api which stores object data as meta tags from where FB scrappes the information (in this case, a blank page where the headers describe the Cookie! object). Is this even possible? I am developing an app for ios with no website, this is why I need to do this.

Is liking an activity is the same thing as liking a business on facebook?

2 Part question
1) So I am trying to figure out the difference between "liking" something on pinterest vs "liking" a business. Is it the same thing?
2) I want to implement people "liking" different pages on my website (such as pinterest) and track which page has the most likes. Do I have to save and track that in my database or facebook API will let me see which pages has most likes based on some criteria?
TLDR: Yes, they are the same thing.
A Facebook "Like" is what is an Open Graph Action. Liking something from within the Facebook web interface or via one of the Facebook plugins allows an easy implementation path. Pinterest uses a custom script that initiates a built-in like action.
Both types of like require there to be an object with open graph metadata that Facebook can scrape to get the information that will be shared on a timeline. That metadata could be served by Facebook on an internal page, or by an external page.
As for getting the number of likes, yes you can. Each canonical open graph URL gets an id within the Facebook system. This includes objects within the Facebook system.
So, the Pinterest Facebook page has an id of 253591661347566. You can find this by querying https://graph.facebook.com/pinterest?fields=id
The Pinterest home page has an id of 185629821512802 according to https://graph.facebook.com/http://pinterest.com?fields=id. (Not urlencoded for clarity). You could replace http://pinterest.com with any other url, and get that pages id.
For any object that you know the id, you can get information on the number of likes it has by adding likes to the fields querystring.
If you've marked up your pages with an app id and admin information, you can see all of this and more through Facebook's Insights.

How to make wall posts made by users on app's facebook page

Is there anything I need to do to make posts users make on their wall via a custom ios application using it's own facebook app id, also appear on app's (facebook app it uses I mean) own facebook page?
I would expect this to appear automatically but it doesn't seem to be the case.
In order to read one's Facebook wall, you need the access token to authenticate reading. This will give you access to all non-public wall posts. From this, you can pass the newly posted content to your page through the feed action.
Reference: http://php-academy.blogspot.com/2011/04/how-to-post-from-facebook-app-to.html
Enjoy and good luck!

Which app do I need to display facebook feed?

I need to display the "wall posts" from Facebook page to another website's social media wall.
The problem is that I never used neither Facebook nor any other social networks and got no clues on how do they work. That's why I'm pretty confused with API and it's terms.
The API docs say that I need a pageId for the page I'd like to display and appId and appSecret to get an access token to the feed.
I understand how to get the token and how to parse the results - but what kind of Application do I need for that? Should I create a facebook profile and make an application that would generate me these app codes? Or ask a page's owner to do it?
I spent quite a time googling but it must be something too obvious to write about it in docs? Help please?
The administrator of the facebook page is the only one that has access to the posts on the page wall.
For the APP:
The application can be created in any facebook verified account - go to: https://developers.facebook.com/apps and create the new app - this will give you the app id and secret.
Use the Facebook SDK that you feel most comfortable with to develop the app.
For the wall posts: There are several Graph API requests for wall posts in the form of:
https://graph.facebook.com/[pageid]/[call] where [call] can be posts, statuses, feed, home. See http://facebook.stackoverflow.com/questions/6214535/what-is-the-difference-between-feed-posts-and-statuses-in-facebook-graph-api for details about each.
Using an access token (that you said you already know how to get) the administrator of the page will be able to call the above URLs and get the wall posts.
For the part with posting the info on another social media website you have to specify the exact environment where you want the wall posts to end up.

Facebook friend validation on an external website

I'm interested in using Facebook as a way to validate that someone is my friend on an external site, and based on that, show them special content.
Inside Facebook, consider this scenario:
I post photos and give permission to friends only
Someone tries to view my photos by URL
If that person is my friend, Facebook displays the photos.
I want to mimic this behavior on my own personal website:
User follows a link to "private" content
My site (either by server-side, JS, Ajax, iframe, whatever) asks Facebook if the person is logged into Facebook in their browser.
If not, user is presented with a Facebook popup to log in.
When the user is logged in, my site asks Facebook if they are my friend (ID coded into the site), and if so, presents them with the content
Is this possible without requiring the user to "authorize" my site or application? My only idea (based on http://wiki.developers.facebook.com/index.php/Authorizing_Applications) is that I could create an application for my site, and then on the external site, load my Facebook application in a hidden iframe (which would in turn load my site in an iframe) to give my site the Facebook user ID and store it in the session.
What is the best way to accomplish this?
Yes, this should be possible. You would have to utilize Facebook Connect. The basic flow would be something like you described above:
User on your site follows a link to
private content. This content is
marked in your database (or otherwise) with the owner's Facebook Id.
Your site uses the Facebook API to
check whether the visitor is logged
in to Facebook. If not, deny
access.
If they are logged in, you can
utilize the friends.areFriends API method
to compare the visitor's Facebook ID
with the content owner's Facebook
ID. If they aren't friends, deny
access, otherwise you can show it.
Facebook Connect is actually fairly easy to implement, despite the terrible docs that are hard to understand. Once you have it up and running, it basically means that any visitor to your site that is logged in to Facebook will provide you with a session key that you can use to query Facebook for information about them.