Open graph stories with user generated content possible? - facebook

Reading through the FB documentation I'm not sure how to approach this or if it is even possible with open graph.
I'm looking to create a story for a iOS app that will post an image taken by the user, along with title and description written by the user. This will deep link back into the app. Looking at the open graph documentation it looks like that is meant only for known and public accessible content. For example books read, movies watched, achievements earned for games etc.
Can I create user driven posts with open graph, or is it really the Graph API I should be looking at?
Main goal is too keep the content private and only viewable to those users the content has been shared with. Seems any open graph solution would make posts accessible by visiting a og: page with the right variables, no auth needed.

I don't totally understand everything you are asking (and I'm pretty new to all of this too) but here's a link on how to have a user post an image and message. You do need an auth though.
https://developers.facebook.com/docs/opengraph/howtos/adding-photos-to-stories/

Related

Get restaurant menu from Page using Facebook Graph API

The problem is to get the link to menu from a Facebook official page of a restaurant.
Here is an example of such page: https://www.facebook.com/freshchoice.bb — there is a link to menu of the restaurant which leads to https://www.facebook.com/download/216155385221332/Facebook%20menu.pdf.
Actually, this link works well even if I remove the name of the file from it, and I understand, that 216155385221332 is an ID of some object. But how can I obtain this ID from the API?
I have already spent two days trying to find a solution for this task and have had no luck.
When I request data from Facebook Graph API, I get tons of information, and I can request any of the fields listed here: https://developers.facebook.com/docs/graph-api/reference/page but there is no 'menu', or 'downloads' field, and I have almost broke my brain trying to find out a way to solve this puzzle.
I don't think there's a way to reach this object if you didn't create it yourself.
There's the restaurant.menu OpenGraph object:
https://developers.facebook.com/docs/reference/opengraph/object-type/restaurant.menu/
but I think only the user who created it can access it programatically.
The page you're referring to probably just uploaded the menu via the Facebook website, and didn't create an OpenGraph object.
Se
https://www.facebook.com/help/533179700126832

Facebook: post on behalf of User, share custom designed content

I read through facebook's documentation and I've seen some examples on the webs, but I can't fully understand the process involved in posting content on the users timeline.
I want to connect the account of my users (users of a web application, which allows to manage and visualize some media content on a custom flash player) to Facebook, and whenever they want, let them share into their own timelines a "story" about the project they've just created.
In particular, I want to show on their timelines the flash player, and other HTML+CSS+JS content and/or interactions.
Something like "user has created a project on MyAPP" and then show a summary of that project on the timeline.
(I have already done something similar using only open graph meta tags and a URL that embeds a fully interactive flash player into the timeline, just like a youtube video)
I read through collections, actions, stories and other stuff, but I still don't know:
Is it possible to do this: share on behalve of the user, custom tailored content? Like custom HTML + CSS + JS (and Flash) ??
If the above is possible, what, nn general lines, must be done to accomplish it? Create a Facebook App, create custom actions, stories, collections, objects... ??
The picture bellow is what RunKeeper posts on my timeline after each of my runs. Is this graph something standard, made by Facebook? Or Runkeeper itself designs, creates and posts the content explicitly that way for their users ??
Is it possible to do this: share on behalve of the user, custom tailored content? Like custom HTML + CSS + JS (and Flash) ??
No, of course you can not embed custom HTML and CSS – since this would not be sandboxed by browsers, you could potentially alter the whole page (think about absolute/fixed positioning, etc.), way to dangerous to allow that.
Flash can be embedded in certain ways – either custom video players for objects of the video type, or previews of flash-based games in the feed (keyword: feed gaming).
The picture bellow is what RunKeeper posts on my timeline after each of my runs. Is this graph something standard, made by Facebook?
That is a story generated for the fitness.runs action and the fitness.unit object type. These are a common action and common object provided by Facebook, and they have the according story type layout pre-setup as well.
If the above is possible, what, nn general lines, must be done to accomplish it?
That question is too broad and general to be answered here. Read the Open Graph documentation, guides and how-tos more thoroughly – and then try stuff out and see what you get.

"Top Posts" depending on facebook likes

I have an idea to create a "top posts" feature to my website, which creates the "top" list depending on how many likes and shares that a post have on facebook.
Users may see how many likes an post has received so far since they only have to ask for a single, defined url. However, the website itself has to be able to query all the links that are tied to itself (which have a predefined url template like website.com/[post-id]) to create the "top" list. Is it possible to do something similar (or achieve the same result in a different way)?
Any ideas on a real workflow about something like this will be appreciated!
this seems like a little but interesting project. I don't know if there is a feature that could get that directly in the way you want, but i did something similar.
First you have the Graph API, with that you can get the Posts of a user using feed, with that every post is telling you how many likes does it have which you can get with POST_ID/likes.
Then you'll have to check for changes in the post periodically comparing its created_time and updated_time.
This could seem very hard, because you have a lot of posts and you have to check them all for updates, but you can use batch_requests so you can check them all at once.
I have made a bookmarklet which shows top posts in the Facebook News Feed as well as Google+, Twitter and Instagram Profiles.
Just add a new bookmark in your bookmarks bar and replace its URL with the following code and save it, then go to the social network website and run it:
javascript:(function(){var s=document.createElement('script');s.src='https://niutech.github.io/topnewsfeed/topnewsfeed.min.js';document.body.appendChild(s);})()
The source code is available on GitHub.

Multiple Facebook share button/link on the same page refering different TITLE & LINK

I need to create a "contest" page where user will be asked to submit picture.
After that, they should be able to share their picture on FB, Twitter, G+, Pinterest, etc for other people to come and vote.
I want the page to be displayed as a jQuery gallery and whenever people select a thumbnail, the bigger picture open with the associated vote and "share" button.
When a user share an image, I want a specific TITLE & URL associated with that particular image... something like "http://www.mysite.com/contest.html#picture1"... or "http://www.mysite.com/contest.html#picture2"
How is this possible if I only have one page?
I wouldn't have problem if I could use the old "facebook.com/sharer.php" with parameters... but it seems that the Open Graph Protocol is "overiding" the sharer.php parameters....
Works fine with Twitter and Pinterest... I might have the same problem with Google+.
Excuse my bad english, thanks!
Well, set up a (“dummy”) page for each picture, and fill it with the appropriate OG tags … and have your users like that. And then put a JS redirect into that page, so that users following the link when it’s shared on Facebook will get to the “real” address you want them to end up at.
(Btw., IMHO this is what happens too often these days when people think doing everything client-side and client-side only is so “fancy” and that a “good” and “modern” site requires all that AJAX/one-page-only nonsense instead of a real good and working URL structure, and then are not able to handle all that this implies properly …)

Share bought products from order on buyer's Facebook wall

The company I'm currently working for wants to create a button that lets people share their order on Facebook after they've paid, but with the deprecation of the "Share" button I don't really know how to do it.
The "Like" button does not seem fit for this. Any ideas, anyone?
There are a few ways to go about this.
You can use the standard sharer. This is good for one-off sharing or in cases where you don't have control or don't want to control how the share is rendered and you want Facebook to handle it.
http://www.facebook.com/sharer.php?u=<url to share>&t=<title of content>
It won't require you to have an app ID but you also won't get a nice control panel for your applications sharing history/insights. You can query and get some information about the URL your sharing though by looking through the open graph.
I.E
https://graph.facebook.com/?ids=http%3A%2F%2Fwww.cnn.com
https://graph.facebook.com/comments/?ids=http%3A%2F%2Fwww.cnn.com
You can set the URL and Title of the content. The sharer will then look at the metadata on the webpage your sharing to determine the contents of the share. More below.
You can also use the Feed dialog. Which comes with more customization options. The Feed dialog is the best option if your integrating sharing as an integral part of the application. I think at minimum you need to include the app_id,redirect_uri and link property. Look through the properties here. You will need an app ID to use this feed dialog and if your using the JS api you need to authenticate the user too. You can also invoke the dialog directly through a direct url where you don't need to pre-authenticate the user.
With either sharing method, you may wish to include custom open graph metatags on your webpage. This way you can influence how the Facebook scraper makes your share. You can set some default (pre-accepted by Facebook) open graph metatags on your page. Or you can create your own set now in the dashboard. In the Open Graph dashboard on Facebook you can customize how Facebook is supposed to read and interact with your metatags.
You can debug your pages open graph metatags by passing your URL through the debugger.
I.E
http://developers.facebook.com/tools/debug/og/object?q=www.cnn.com
This will give you, for example, JSON or an HTML representation of how FB sees the page.