Retrieve Facebook Page Insights using backend service - facebook

I wanted to develop nodejs app for my company which runs on certain internal and pull Facebook page's insights(from the page that my company managed via business manager) and store it in database. Subsequently, we will use this insights to present to the management via customized dashboard. How can I accomplish this?

Related

App Acceptance Process for Facebook Marketing API

I am looking at using the Business Manager API to manage our clients Facebook advertising, including a central billing implementation, and have a few queries.
From what I can gather, to use the Business Manager API, I have to have my App accepted, then request access to the Business Manager API, then open a line of credit.
Can I develop my application in sandbox mode and get access to the Business Manager API?
How long does the process, usually, take to accept a Facebook APP, give access to the BM API and open a line of credit?
Not being able to access the BM API endpoints to manage clients and create ads hampers the development process and the ability to request the Facebook App for review.
Any help on this would be gratefully appreciated.

Do I have to create an app using the original Instagram API before i can use the instagram graph API?

I'm trying to create an app with the new Graph API for instagram business accounts.
I am following the documentation here
It says after adding Facebook login, I need to submit the app for review to be able to use the api, and I need to create a screencast on how the app will be used.
Am I looking at the wrong documentation? How am I suppose to create the app without being able to pull any data from the API?
Is there no sandbox mode until the app is developed that I can use?
Do I have to create an app using the Instagram API first to be able to request permissions to use it?
While I haven’t had any experience in Instagram apps, I do have a bit of Graph API experience with Facebook
While in development (a switch at the top of the App Dashboard), any developers and administrators can test the app using any and all permissions. To make the app public however you need to submit for review.
The new instagram graph API is an extension of the existing Facebook API.
So you can make requests on the new API by have a facebook login on your app, then requesting access for the users pages and the users instagram data.
Once you are able to access their pages data you can submit a get request and fetch ?fields=instagram_business_account
once you get the instagram accounts ID, you can make requests on it following this documentation
In development you can only access your own pages, once you build using your own data then you can submit your app for permissions, and finally you can submit your app for review.

azure app authentication/authorization between apps

I have an azure mobile all that uses authentication/authorization with facebook, everything is setup and working on my mobile app, I’m able to authenticate with facebook and get an access token.
I also have a web app (ODATA) hosted in azure and also uses authentication/authorization with facebook and its also working fine if I try to access the ODATA service it redirects me to facebook to login.
According to this article (https://azure.microsoft.com/en-us/blog/announcing-app-service-authentication-authorization/) I should be able to silently or programmatically send the access token from the mobile app to the web app by sending a json with acces_token key.
The may question is how I do this, is that access token in the header or where should I write it I can find any information from it. I would really appreciate a code example or an article that can guide me to accomplish my task
The may question is how I do this, is that access token in the header or where should I write it I can find any information from it. I would really appreciate a code example or an article that can guide me to accomplish my task.
Based on my understanding, you are using Client-managed authentication for independently contacting the facebook then retrieve the access_token from facebook, then you could leverage the access_token to login with your azure mobile app backend.
Also, you have a Azure Web App uses authentication/authorization with facebook and use the same facebook App ID. Then you want to leverage the access_token in your mobile client to access your another Azure Web App. At this point, you could login with your azure web app and retrieve the authenticationToken as follows:
POST https://{your-app-name}.azurewebsites.net/.auth/login/facebook
Body {"access_token":"******"}
Then, you could leverage the authenticationToken and set it as the x-zumo-auth header when accessing your azure web app as follows:
Get https://{your-app-name}.azurewebsites.net/api/values
Header x-zumo-auth:{authenticationToken}
Additionally, you could create your custom Web API endpoints within your azure mobile app, details you could follow adrian hall's book about Custom HTTP Endpoints.

Facebook Review for API only App

I am working on building Facebook integration from an internal company application to allow for creating Ads on Facebook using their Marketing API. In order to accomplish this, it appears creating an "App" is a necessity to be able to get access to their API. This App will ONLY be used for API communication and should never be needed by an end user on Facebook.
My problem is the App is currently in development mode and I need to submit it for review in order to qualify for a higher level of API access to not be as rate limited on the number of requests. Since this App is only used for API access is there a way to keep it hidden from the general public on Facebook? It should never be needed to be accessed directly from any random Facebook account, only from the SDK we are using interally.

Facebook app configuration to generate reports for my clients

I created a really simple Facebook app that simply executes FacebookRequests and retrieves impressions, insights, and post data.
I had to create a Facebook app b/c in order for me to make these requests- I needed an APP ID and an APP SECRET.
I'd like to be able to easily generate reports for my clients' Facebook accounts that I do not directly manage.
What is the best/easiest way for my clients to accept/allow this app's usage? I don't want a page tab on my clients' accounts, either. I don't want to broadcast that they are utilizing this service that I setup.
Thanks,
Mike
The solution that worked for me was manually building a login flow per Facebook's documention.
Once the user authorized my app- it was successfully listed under their [Settings | Apps] section. Since this user managed the Facebook Page, I could execute FacebookRequests and retrieve impressions, insights, and post data that I had mentioned in my question with the page ID and the access token that the login dialog response provided.