I've been trying to use Facebook's new "user owned" objects as a way to track progression/scores in a mobile Unity game, for the user and their friends. So for each "level" completed I create a new myapp:level object.
Whenever an object is created like this, though, it shows up in the user's activity log as "User posted Object Title". I mostly just want to use these objects as data storage, and as a way to for the app to query and display your friends' data. I only really want to post a custom action (e.g., myapp:complete) if the user explicitly chooses to share it from within the app.
Not only does it generate these posts, it also create a new custom object type in my app's type definitions, simply called "Object", and an action type called "Post" (which seems to actually be og.posts). I even have to submit this auto-generated Post action for review, which seems odd.
Can I somehow disable the post action or is it an intrinsic part of creating user owned objects? If I can't disable it, is there any way I can hide it from the user? I can't set no_feed_story on the action as the action is implicit from the object creation.
(Note, I'm not using the Facebook 3.5 SDK on iOS, but using the Prime31 Facebook plugin for Unity, on Android, but really I'm just sending graph requests as specified on the Object API page.)
I don't think it is the intention of Facebook user owned objects to act as a data store?
Anyway, the way the graph works is that all things you publish is an actually an action. Even when posting objects. What is published on the users timeline, is the action of posting this new data item to the social or open graph.
Bottom line: you cannot get rid of this posted thing, as it kind of defies the purpose of Facebook being open and social.
Related
Im working in a new web app, i created an action and an object in my facebook developers page.
All the users do the same, they "drop" an "object". The thing is, the name of the object is variable, so the same happens whit the link that i want to send them when they click in the facebook post.
There is a way to do this, or when every user drop an "object", to publish, i have to create a new facebook custom object in my app?
I have created custom action and custom object types.
I create custom object instance using Facebook Open Graph Object API
I get the id of the object and use the id to post the story.
In the timeline, I see 2 posts:
"User" posted "custom object title" via "app name"
Story that I explicitly published.
Why is (1) getting created? Is it possible to avoid (1) in some manner?
Thanks
Check out How Open Graph Works. They are tied up to an action and that is why (1) is created. If you only want to publish the story, I would suggest using a "status update" on Facebook. Also, take a look at Parse. Facebook recently bought it and it's super easy to integrate.
(1) is posted if the object is being created using the user access token.
When the app access token is used, then (1) is not published.
Of course, you should not use the app access token on the client side.
is it possible to get the list of actions that were published into current user's timeline? For example, all the read actions (news.reads) that were published through my app into the user's timeline.
I know how to publish built-in read actions with the Graph API, but not how to get all the actions someone has already published.
The idea is to create a list of all actions the current user has ever published, and then let him decide which of the actions he would like to remove from his timeline.
For built-in actions, you can retrieve all listens, reads and watches (and games activity), with the appropriate Open Graph Permission. You do this with a simple Graph API call, such as:
https://graph.facebook.com/me/news.reads?access_token=USERACCESSTOKEN
See more here:
https://developers.facebook.com/docs/opengraph/actions/builtin/
For custom actions, an app can only retrieve any action that it has published. In this case, the user_actions:APP_NAMESPACE Permission must be requested from the User, and then the Graph API call will be something like:
https://graph.facebook.com/me/mycookingapp:eat?access_token=USERACCESSTOKEN (where mycookingapp is the app namespace, and eat is the custom action).
You can see what the Graph API call to read all of a particular custom action type is for your app by going to the Open Graph section of your app's App Dashboard and clicking on 'Get Code' beside the relevant action type.
I'm trying to build a Facebook App that will run in the Canvas on Facebook. I want to give users the ability to create custom open graph objects. For example I want users to be able to make a donation bucket. Title, Description, amount needed, time left, goal. I want the user to make these and then when someone contributes it will post saying "USER_NAME added to the donation TITLE"
Is it possible for users to create objects in this way? Most of what I've seen is about the developer making objects and users acting on them.
An Open Graph object is basically just an URL, that provides the relevant info via appropriate meta elements.
So where’s the problem? You just provide an URL that provides the data your user entered – this could f.e. just contain an id as GET parameter, which let’s your script read the relevant data out of your database and fill the meta elements with it.
What I want is to be able to put the wall content of my facebook page in my website. I want to include the posts and comments of others and mines.
I have 2 questions:
Activity feed:
Here is what the FB docs say :
<fb:activity
site="jerrycain.com"
action="critiqueapp:despise,critiqueapp:review,critiqueapp:grade">
</fb:activity>
Where can I get a list of all possible actions? Can I specify that I want posts and comments?
OpenGraph:
I was able to get an access token yesterday, that is not valid anymore. I was able to see a json object of the wall content. What is the best way to have this permanently?
Activity feed social plugin is using OpenGraph actions in action field so the complete list is simply not available due to possibility to create custom actions for every application, there is several Built-in Action Types:
Watch - Video, Movie, TV Show, or TV Episode
Read - Article
Currently specifying like also works but it's not documented. Aside of those pre-defined actions you may Define Actions. Neither posts or comments is listed as supported actions in documentation.
Access tokens are expired and need to be extended if you need longer life-time of a token. Also you may use application access_token to access public posts from your page (without need to get the token from user)...