Facebook URL scheme to post on a page - iphone

Is it possible to post on a page with a url scheme?
I currently have this, fb://profile/325899700848032
But this only opens the page ofcourse. What i mean is something like this
fb://profile/325899700848032/PostMessage/"test message" or ../PostImage/image
Is anything like this possible to do?
Thanks!

To post on facebook page you need to ask first for the famous manage_pages authorization. Once you have it you make a FBRequest on the openGraph for me/accounts which return an array of the current user pages and other application. You parse this json for each page and you pick the token_access and the id. You then set the page token access on your facebook manager and then you can post for example a picture to the page with the "{id}/photos" POST graph request {id} being the page id.

Related

Facebook open graph url redirect issue

I am trying use open graph API to publish an action. URL that I provide as part of meta data property og:url can be accessed by authenticated users only. Facebook is trying to scrape the URL and is ending up with a sign_in page due to a 302 redirect.
Do I have to construct a page just for facebook scraping with meta tags in it? Isn't this url linked to the content published on facebook?
If you want your articles to be sharable or do any SEO, you shouldn't be using 302 redirects. Bots will only see the content from the destination of the redirect.
You want to have just one URL for each piece of content. If an unauthenticated user, the Facebook Scraper, or Googlebot visits that URL, you want it to see all your Meta tags and some teaser content.
If the user isn't authenticated, use a server-side scripting language to display a register/sign_in dialog instead of the premium content. If the user is authenticated, then you show them the full content.
This is better even from a UX perspective: Say I follow the link from Facebook and register. When I sign in, how are you going to get me back to the content I wanted to see in the first place?

Post an OpenGraph action for Like and Comment without using Like and Comments plugin

I am using GraphAPI to send comments and likes to a facebook photo from my site. The problem is I want to post the action to the user's wall, one which should be viewable from their friends' news feeds like "ChrisB liked a link" and "ChrisB commented on a link", where link is the photo's url on facebook. Of course I expect the photo thumb and name and description to appear on the post as well.
I have attempted to use custom OpenGraph actions and objects for these, but og:url won't accept facebook links now (which is odd because it still works for facebook pages). The error I'm getting from the linter is "Facebook urls cannot be crawled".
Is there any way to get the result that I want?
Instead of using a Facebook URL directly, try using bit.ly links or some way of automating the redirection from your site to Facebook. For example, I would use the apache module mod_rewrite to create a page on my website, but have it redirect to Facebook.
E.g. 'fake page' would be domain.com/{photo_id}.jpg, but have mod_rewrite redirect to http://www.facebook.com/photo.php?fbid={photo_id}

How to get facebook page rss feed (everyone)

If you view facebook page, they are link left-bottom shows rss feed for facebook page, but unfortunately, the feed only shows status update by page owner, is there anyway to get feed from everyone who post the new status in the page....
There's another way to get the feed from a public Facebook page as RSS, which is entirely public and can be retrieved anonymously; i.e. requires no Facebook connect or other stuff. The format for the URL of the RSS feed is:
https://www.facebook.com/feeds/page.php?id=PAGE_ID&format=rss20
Where PAGE_ID is the Facebook ID of the page. Or even better, as JSON:
https://www.facebook.com/feeds/page.php?id=PAGE_ID&format=json
Use http://developers.facebook.com/docs/reference/api/, get the access_token like this: Facebook: post image and description to wall and in page album via php
These guys seems to be providing an API as well here - https://randomtools.io/developer-api/

How to get the header URL of a Facebook fan page?

I'm developing a Facebook app and I need to get the URL of the page where the app is installed to set their share buttons and other params.
Thanks!
Take the page id from the signed request (http://developers.facebook.com/docs/authentication/signed_request/) and then call /PAGEID?fields=link and pull out the link value. This would be the url.

How to build FaceBook "Like Button" that likes a Page message?

For example:
I have a FaceBook Page about my website.
On my website, I display my 3 most recent FaceBook page messages (graph.facebook.com/[pageId]/[more parameters])
Next to each FaceBook Page message (as they appear on my website) I would like to add a FaceBook Like button. When the like button is clicked, a "Like" should be given to the FaceBook Page Message. How can this be done?
Simply use the permalink of the post as your url in an fb:like button. The tricky part will be figuring out what the permalink is, since it takes different forms if it's a link, status, or video. For a link or status update, it's this format:
http://www.facebook.com/<PAGE_USERNAME>/posts/<POST_ID>
Or, if you don't have a username:
http://www.facebook.com/permalink.php?story_fbid=<POST_ID>&id=<PAGE_ID>
You can determine the post ID and page ID by accessing http://graph.facebook.com/<PAGE_ID>/posts and splitting the id string on the _.
You should be able to POST to the /likes URL of any object that supports likes. No arguments should be specified. You can remove a like by executing a DELETE request to the same URL.
/OBJECT_ID/likes
Like the given object
(if it has a /likes connection)
So the URL you should POST to, is https://graph.facebook.com/[pageId]/likes
Read more under Publishing on this page: http://developers.facebook.com/docs/reference/api/