Posts tagged with facebook-graph-api

I am attempting to create a Facebook posting using Jupyter notebook.

import facebook as fb # Initialize the Graph API with your access token access_token = 'code' graph = fb.GraphAPI(access_token) # Test API call user_info = graph.get_object('me') print(user_info) # Create the post post_message = "testing" graph.put_object(parent_object='me', connection_name='feed', message=post_message) 

However, there is an GraphAPIError: (#200).

In my Graph API Explorer, I have User Token with the following permission: user_events, user_photo, user_videos, user_post, public_profile.

May I know what else am I missing?

I'm trying to set up the FB for business login on my facebook app (reviewed and validated).

I'm using laravel php callback. it works with users logged into facebook that have admin role on my app.

return Socialite::driver('facebook') ->scopes($scopes) ->redirect();

I works fine with users that are admin of my app, but i get a blank popup login page when I use any other users

Can anybody help on this?

inspecting the browser console it shows this error

c7bTB9A8MMc.js?_nc_x=d7ylh6LA-3y:69

ErrorUtils caught an error:

Minified invariant #21945;

Is there a way to set the monetization of a video when it is posted via the Facebook Graph API?

When I post the video to Facebook I would like to selectively enable or disable monetization depending on the video.

Monetization requirements have been met and monetization has been turned on in the Meta Business Manager for the Facebook Page.

I am using the {pageId}/videos endpoint.

I have tried setting unpublished_content_type = ADS_POST with scheduled_publish_time set to 10 minutes in the future and published = false but the post failed.

i have 1 dog page on Facebook, i usually post photo of dogs when ever i have time, so trying to write a scheduler that will take images from my system folder and upload and publish on my page.

i want to post images, from my local system to 1 of my managed pages. i have page access token. and using below curl i am getting response as well.

curl 'https://graph.facebook.com/v19.0/page_id/photos?published=true' -H 'Cookie: ps_l=0; ps_n=0; ps_l=0; ps_n=0' -F 'access_token="my_page_access_toekn"' -F 'source=@"/C:/Users/Downloads/cute_dog.jpg"' -F 'publish="true" 

and i am getting response back

{     "id": "38868xxxxx",     "post_id": "10326941xxxxx_388682220xxxxx" } 

when i login from my own account, i can see the images being posted on the page. but when i login from my friend account, i don't see the image. i tried adding publish="true in body as well as in path param, but nothing seems working. for reference, i am following this page https://developers.facebook.com/docs/pages-api/posts

what am i missing?

I created a meta app using the email address associated with the base facebook account that created the page I am trying to get the posts from. In the Graph API Explorer I have selected my meta app and "user token". When I add the page ID to the query string field and click submit I get the error:"(#100) Object does not exist, cannot be loaded due to missing permission or reviewable feature, or does not support this operation. This endpoint requires the 'pages_read_engagement' permission or the 'Page Public Content Access' feature or the 'Page Public Metadata Access' feature."

But I don't see 'pages_read_engagement' in the list of permissions to choose from. Do I need to apply for "page public content access"? Do I need to use a page token? When I try to select "Page Access Token" as the token type I get a pop up saying "Sorry, something went wrong. We're working on getting this fixed as soon as we can."