Using common Rate action to custom object - facebook

I have a website on which users can rate a concert and I'd like to post this action on the user's timeline.
But since facebook already has common Rate action only for books and videos, I cannot find a way to do this.
I see two alternatives (but I don't know if they're possible):
Using the common rate action on a custom object (for example, a music festival in my website)
Creating another action which is similar to rate just so I can publish on facebook (it is kind of cheating, but I can't really see another way)
I'd like to know which is the better way to go now, or if there's another alternative.

Since facebook only allows rating for books and videos yet, you could use in your facebook story symbols like ✪ or ✭.
So you only need to write them dynamically into your user story, user feed or the way you let your user post their ratings. I think when you put them into headline, they'll be big enough.
Here are some stars: ✩ ✪ ✫ ✬ ✭ ✮ ✯ ✰
I know that it is just a bad workaround, but as soon as I'll know that facebook changed their rating system, I'll update this answer.

Related

Open graph stories with user generated content possible?

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/

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.

Facebook OpenGraph Story link to app on Facebook

I am working on an game app contained in Facebook via the Canvas. The game consists of several order-independent 'levels' that each correlate to an entry in a database. Metaphorically, you can think of it as similar to hangman in that the game is the same each time but the content in different (in the case of hangman, that is the word being guessed).
When the user plays a level, I create a story via the OpenGraph API. So say for example Bob plays level Alpha, and his friend Sue sees his feed story which says "Bob played Alpha in SomeGame." I'd like a link in that story to take Sue directly to playing level "Alpha" in SomeGame, and not to the generic entry point in the game where the user can pick a level (i.e. what normally happens when you hit the Canvas URL). It appears that you can use params, like this:
apps.facebook.com/somegame?level_id=1234,
and then in your Canvas URL endpoint you can redirect based on those params. But is that the preferred way to handle this?
Also, if the story title in the Feed is "Bob played Alpha in SomeGame", I'd like the link on "Alpha" to take Sue to playing "Alpha", but as far as I can tell that link is generated by og:url in the object metadata, meaning it has to link to
www.somegame.com/level/:id, and not
apps.facebook.com/somegame?context_params=some_stuff.
But I really don't want people to visit
www.somegame.com/level/:id
directly - I'd like them to stay inside Facebook, and view it within the app hosted by Canvas.
I can get the behavior I want if I give
www.somegame.com/level/:id
a javascript redirect, which uses parameters for the level id:
(top.location.href="http://apps.facebook.com/somegame?level_id=1234)
However this seems like a hack, and I was hoping there is a cleaner way to do it, without a browser-driven redirect. Thanks!

Facebook Open Graph Follows

Similar to the ability to subscribe to a user's posts on Facebook, users can since today, follow other users' Open Graph activities from a specific app. For example, on a movie review site, users can follow their favorite movie reviewers.
There's no example of this yet, but if you submit the new follow action you'll get the code and have an idea of how it goes. It's very easy: hit(GET) https://graph.facebook.com/me/og.follows with a token and a profile ID. What I don't get is the third_party_id.
I have read this sentence over and over and still can't decode it: "This tag is not required, and follow actions will succeed without it, though followers will not see activity in their News Feeds without this."
How to use the third_party_id? And most important, from now on, only the actions from the the people I subscribe to will been seen on my feed?
Full info here: https://developers.facebook.com/docs/opengraph/actions/builtin/follows/
What I don't get is the third_party_id.
If you’re posting a follow action not for a facebook profile, but for an URL (as in the example, profile=http://www.rottentomatoes.com/celebrity/tom_hanks/), then that page has to have a <meta property="fb:profile_id" …> element to tell Facebook what to actually follow.
To get the third_party_id, you query the Graph API for a user with /userid/?fields=third_party_id.
(I’m guessing using the third_party_id in this place instead of the actual user id is just recommended for the simple reason, that this way not everyone who looks into the HTML code of the rottentomatoes page can see what FB uid Tom Hanks actually has.)
If there is no corresponding user on Facebook for the URL that’s being followed – then there isn’t anything to follow at all, because there will be no posts on Facebook that could been shown in a user’s feed.
How to use the third_party_id?
This could have been explained better by Facebook. I think it works like this:
Lets say William followed Claudette in your app and that your app successfully published a follow action on facebook. Whether you provide Claudette's third_party_id or not, a story that William followed Claudette, will get published on William's News Feed.
However if Claudette's third_party_id is provided, then William will start getting stories about ALL of Claudette's actions published by your app. Now, thats pretty cool. But of course to do this, Facebook needs to know "who Claudette is" which is what third_party_id does.
To summarize, by not providing third_party_id the follow action gets shared on William's news feed and potentially to William's friends. But thats a one time thing. By providing the third_party_id you are extending the virality and ensuring a constant flow from Claudette to William for actions Claudette does on your app.