Can't post actions to a Facebook event - iphone

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

Related

Can I transform a user-id to PSID? - Facebook API Graph

Context: I'm building a webhook with NodeJS to get events from Facebook Page with my Facebook App. These events are: feed, mention (when a user tags the page on his wall) and message. I can get all events without problem. In all events I need to identify the user who write. When the users write a post or message in the page I get an ID (PSID) but when the user write a post on his wall tagging the page I can't get PSID, this is obvious because he isn't in the page scope. The only I get from this event is user-id from post-id.
I have tried the following:
I used this endpoint GET: /<user-id>/ids_for_pages as indicated in the documentation. This doesn't work for me because I would need that the pages are in my business administrator and this isn't possible because I need this webhook to manage many pages to many companies.
I used this endpoint GET: /<psid>?fields=name,id for events of type feed and messages (from Messenger) into the page but this gives me only PSID again.
Note: In my DB I save long-lived token of my page, ASID of the site owner and Page ID when my user does the login in the UI.
My questions:
Is possible transform user-id to PSID?
Can I get user-id through the PSID?
If you have a better idea to unify IDs when is the same user, I would like to know it. If this isn't possible I would also like know it.
My Goal: Each user event goes to the same case for the same user in my API, for this reason if the user is the same when tags the page and/or write a message in the page the idea is to identify him like same user and not like new case.

How to send any actions to my API by facebook-messenger API if the person isn't available?

When a user blocks my facebook bot account I can't handle any query about this action, but I need this information on my API. I try to write to an unavailable person from Facebook Page, but I just get an error "this person isn't available right now" in front and without query to my API
How I can handle, find and check unavailables users?
I thought to handle actions from chat on application's Facebook page (Mark as Done, Delete chat, etc), but I don't know how I can to get this on my API.
Facebook actions
There is no specific event for such an action (user blocking the conversation), so your only option is to handle the person-not-avail error response and mark those users on your end.

Azure Logic apps Facebook connector gives empty response

When I try to use the Facebook connector in Azure logic apps I can't seem to get the "Get user timeline" to work.
I know for a fact that the User ID is valid (I checked using this URL: https://www.facebook.com/profile.php?id=). I also know for sure that the user has posts on it's timeline. I also tried multiple user ID's.
When I open the failed request in the Logic app I get this, the response is empty every time.
Is this related to privacy settings? Why doesn't this work?
We should probably retire/remove that operation. It is not possible to retrieve the post from Facebook graph API for another user's timeline. It used to so that is why it is there. Specifically, this post might be helpful: Facebook Graph API {user-id}/feed from others empty
The connector calls the /{user-id}/feed API. You can try out the behavior in the Facebook Graph explorer as well. https://developers.facebook.com/tools/explorer/

How to get post ID of Facebook shared URL, or how to get all posts shared via Facebook app?

Goal
My goal is for a user to share something he created on my site to Facebook, and for me to display all comments on my own page using the Facebook comments plugin.
So my ideal flow would be:
User creates content with example id vjrjf834fdkfj, and shares using public URL http://example.com/vjrjf834fdkfj/.
User shares this URL on Facebook via my Facebook app ID. The post ID is 1234567.
I get this post ID. (This is what I need help with)
I store this in my database.
Whenever a visitor visit the page http://example.com/vjrjf834fdkfj/ I look up in the database what the post ID is (1234567 in this example), and call the Facebook comments plugin using this post ID.
What I tried
Attempt #1
First failed attempt: read the post_id field of the FB.ui callback but this response is typically empty because Facebook says that:
Only available if the user is logged into your app using Facebook and
has granted publish_actions. If present, this is the ID of the
published Open Graph story.
My user is not always logged into my app via Facebook, because he can also create a normal account.
Attempt #2
So my next attempt was to get a list of all posts of this app by calling the Graph API. I have a "basic" app with the "Website" platform set to my website URL (www.example.com). Given this list I might filter this on the relevant URL and voila, get the post ID for the right URL.
I can create an access token and call https://graph.facebook.com/v2.8/{app-id}/objects?access_token={token}, but this gives an error The parameter type is required. And when I try to get a list of object types by calling the /object_types endpoint, I get an empty list.
Attempt #3
I also played a bit with creating a Page Tab but the documentation makes no sense to me as to how that would apply to my case. I ended up with two extra pages, all empty, and not what I want. However, I could live with an extra page on my Facebook page showing a list of all posts that have been shared (so these posts would appear here and on my user's timeline).
Questions
So:
Why is this object_types list empty? I expect that something like "post" would show up here, allowing me to get a list of all posts associated with this app ID.
If this is not possible, how can I still achieve my end goal?
Thanks.

Facebook Graph API Events ticket_uri not working

When fetching a Facebook event from the Facebook Graph API, there is a field for the ticket_uri
The response always looks like this:
https://www.facebook.com/ajax/events/ticket.php?event_id=1461866457391623&source=12&ext=[aBigNumber]&hash=[randomhash]
which basically works in the current browser session, but does not work when saved and used somewhere else, like an other browser.
Is there a solution to redirect the user to the correct "Book now" url
That's the intended operation of that field - It's intended to be used by the current session user (i,e whose access token you're using) and contains a user/session specific hash which will expire -
If you want to link arbitrary other users (i.e. who aren't using your app) to the event for ticket purchasing reasons, the only alternative is to link them to the Event on Facebook.com and have them click it themselves