webhook realtime event on post shared to many facebook pages - facebook

my application can share posts (like photos) to some user's page. (can be for multiple users).
when sharing a post, the user gives my app a permission for sharing. when doing this, my app receives token and post-id, and I can make API requests to get some post data like views etc...
I read Webhooks api, but couldn't find any reference if my requested behaviour is supported: I could understand that the supported behaviour is the one if a user is manual configuring his page to support hooks.
to make better understanding, this is the flow:
some user is logged in to my app
user wants to share a photo from my app to his facebook page
user 'click' on share, accept the permissions, the photo is shared on his page, my app receive token and post id
I want to receive hooks to my app endpoint on any change to this post (like, view..)
is it possible??
thanks.

Related

Facebook Data Deletion Request Callback

I have a mobile application, we implemented a Facebook Login as one of the different ways to register and log users in, now Facebook asks for "Data Deletion Request Callback" which will delete Facebook data if the user removed the app from his Facebook account.
the question is what data should I delete (Facebook ID, Image, Email)?
or should I remove his account on my app (that will cause a problem with my data)?
not sure how Facebook reviews, Approve or disapprove goes, can anyone share his experience about this?

How to request page messaging permissions on facebook apps?

When using facebook apps like chatfuel and manychat (which are bot creation platforms), these apps request permissions that allow them to manage my pages and send messages.
I want to create a similar app that allows users to send messages from their pages through my app, but I can't find how to request such permissions in Facebook's documentation.
You need to be given the administrator role for each Page, then connect your app to the Page and generate a page-scoped token for each one.

how to request permission to post ads on a page as an app?

I'm working on a facebook app that posts newsfeed ads, and I have been banging my head against the wall for the last few days, the work flow should go like this:
User provides his page id.
The App requests authorization to post ads on the page. stuck here
App verifies that the user authorized it.
App creates adcreatives using the user's page_id in the object_story_spec call to /adcreative using the app's ad account.
I went through How to post to page as an app?'s docs, couldn't figure it out.
the app is written in Go, however if you can provide a code sample it doesn't matter what language you use, I just need the basic work flow.
Not sure what you want to do exactly, but if you want to create ads (for am ad_account/user) via an app, you'll need the ads_management permission during Facebook Login.
How you manually create a login flow can be found in the docs as well.
See
https://developers.facebook.com/docs/facebook-login/permissions#reference-extended
https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow

Using Facebook publish_actions on a live event and getting the app reviewed

I want to create a Facebook app to be used in live events (ie: concerts, conferences, etc).
So the guests would enroll to the event connecting with Facebook Login and asking the publish_actions permission.
The guest will have an Access Card (RFID chip) that identifies himself and links in our database to his Facebook Access token.
Then, during the event, I would like that some actions made by the guests in the event to trigger some actions on Facebook, this actions will be triggered by different applications that communicate with our servers, our servers will comunicate with Facebook API to trigger actions on Facebook.
So when the guest does check in at the event, his Access Card is scanned by the event staff, and then should automatically post a message on his timeline indicating that he is at that event, sharing a link with more details about that event.
We also want to have a physical Photo Booth where the guest has his Access Card scanned, and then takes a picture that should be automatically posted on his timeline too.
So this is not the typical Facebook app flow, as the content is posted automatically by actions made by the user, but managed by our software instead of actions directly triggered by the user himself.
I'm not sure if this kind of application is allowed on Facebook and if it's allowed, how would the review process be done, as this can't be tested using a website or phone app.
Did someone make something similar or knows the best approach in getting this approved on Facebook?
Thank you!
The user MUST login with Facebook and authorize your App. People have tried those things with a specific device where people could login, but Facebook detects multiple logins on one device and may block your App. So the only way is to let people use their own device/smartphone to authorize your App. For example, you could offer them a QR tag with a link to the login flow.
The problem with authorizing before the event and storing a Token is that an Extended User Token is valid for 60 days. So if a user enrolls and the event is 61 days later, the Access Token will not work anymore - unless the User refreshes the Token by visiting your App. So before letting him do this before the event, you can just as well let him authorize the App at the event date.
A specific App for the event is surely the safest way, of course.

Post to Facebook via API but Limit Access to FB App Users

I've got a Facebook app that allows app "requests" to be sent to other Facebook friends. What I would like to be able to do is then allow users to create status updates/posts that will only be visible to the FB App users who they have sent requests to previously.
I'm trying to do all of this via the FB Javascript API. Is this possible?
Sure you can but you'll have to manage the privacy limitation 'manually' by storing all invites in your own database. The apprequests JS SDK call has a callback that contains a request_id and, more relevant to you - the facebook ids of the user who sent the invite and the user that was invited. You'll have to save that information and then use it when posting.
Here is a link to the facebook documentation on apprequests... All the information you need about the callback and using the apprequests feature is located there...