How to retrieve all actions that were published by the current user - facebook

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.

Related

How to retrieve Job Applications from Facebook Page using graph API

I wanted to retrieve job applications from Facebook page using graph API. In the graph explorer i have applied my page Id in node. where we can see several fields like post, conversations, likes... Now if a person clicked "Apply now" button on facebook page. Facebook will capture the vital information to prepare resume. Now i wanted to pull those information against the job post. How is it possible using graph api https://developers.facebook.com/tools/explorer/
I believe that facebook requires you to set up a recruiting manager to access the jobs feed via that user instead of accessing the job information via the graph api for a page. This ensures that the business that owns the page has one person assigned to handling the job interactions and that the application information is being kept secure.
https://developers.facebook.com/docs/pages/jobs-xml/how-to/

Creating user owned objects generating implicit "post" action in timeline

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.

Can't post actions to a Facebook event

I have my server side code create an event on Facebook, using a Facebook application user I created.
Then, I want mobile users of my app, that logs in to my app using FB connect, to be able to publish actions on that even's wall.
I tried doing it using code,curl or graph explorer, but nothing seems to work.
I suspect the only option is to publish actions using the user that created the event.
When I Post to a link like this:
https://graph.facebook.com/EVENT_ID/APP_NAMESPACE:ACTION
With the object as a parameter as well, I get the following error:
Requires a valid user is specified (either via the session or via the API parameter for specify
When I post to link like this :
https://graph.facebook.com/EVENT_ID/feed/APP_NAMESPACE:ACTION
I get an error:
Unknown path components: /APP_NAMESPACE:ACTION
Any way to achieve that ?
The error message is telling you that an event's /feed connection has no connection of /APP_NAMESPACE:ACTION type. This error message is correct.
Posting actions to or as a Page, Event, Group is not possible, nor is it possible to post actions to a friend's Timeline - only users can post actions, and only to their own timelines.
See the Open Graph Mechanics part of the docs, it shows that users perform an action on an object. What you're trying to do is having a user take an action, and then post that to an event wall - that's not supported

Wall content on my website

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)...

Can I get count of all Users on Facebook who have taken a Custom Action?

There are now Custom Actions in Facebook iFrame/Canvas. So one can create a basic verb/object pairing for their application. For example, I could create a "cook recipe" pair and have this show up in a variety of places in the user's profile.
I can access these custom actions using /me/activities in the Open Graph API. I would like to know if there is anyway that I can get a count of all users who have taken the action I created.
Apologies in advance, I am new to Faceboook development, so I am not 100% clear on some of the finer points.
Thats not possible via the API. But keep an eye on the Insights API (/app/insights) as this should eventually be updated to include monthly per-action stats. These stats are already available in the insights dashboard for your app.
However, as you're posting the actions to Facebook yourself, you should be able to keep a count locally in your app.