Category : facebook-graph-api

i try to make batch request via facebook graph SDK. I want to use requested values in next request $getPageId = $fb->get(‘me/accounts’); $getInstaId = $fb->get("{$.data.0.name}?fields=instagram_business_account"); $batch = [ ‘user-account’ => $requestUserName, ‘insta-id’ => $requestUserLikes, ] but the this part => {$.data.0.name} still light red.. its jsonpath type. What should i do? any solutions how to ..

Read more

I cannot attach the uploaded file. I see that fopen($image->getPathname(),’r’) returns not convertible json data type making guzzle return error json_encode error: Type is not supported. What am I doing wrong here? Thank you. stream resource @586 ▼ timed_out: false blocked: true eof: false wrapper_type: "plainfile" stream_type: "STDIO" mode: "r" unread_bytes: 0 seekable: true uri: ..

Read more

We used to access Instagram API using https://api.instagram.com/v1/users/self/?access_token= to obtain the follower, following and media counts. How can I obtain these using Facebook Graph (in PHP)? Seems this needs to go through Facebook Graph now and may require multiple calls to other graph endpoints? $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, ‘https://api.instagram.com/v1/users/self/?access_token=THE_TOKEN’); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, ..

Read more

I want to backup all Facebook photos from a user with a webapp made in PHP/Laravel. What I do right now is: I first get all albums with /me/albums Then I get all photos from each album with /<album id>/photos And then I retrieve each photo with /<photo id>/picture?type=normal And that gets me this: FacebookFacebookResponse::__set_state(array( ..

Read more

The following error shows up daily multiple times (not continuously), is there any way I could figure what is causing it and how to solve it? Error Deadlock found when trying to get lock; try restarting transaction [in wordpress db inquire? (its something translated)] DELETE FROM `ags_options` WHERE `option_name` = _transient_timeout_wc_facebook_aam_settings (and on another line ..

Read more

I have installed the FB graph and ads API via the composer. As instructed here by FB Versions are: { "require": { "facebook/graph-sdk" : "~5.0", "facebook/php-ads-sdk": "2.8.*" } } I believe these are the latest versions. However, when I run this code: require ‘_/composer/vendor/autoload.php’; use FacebookAdsObjectAdAccount; use FacebookAdsObjectCampaign; use FacebookAdsObjectCustomAudience; use FacebookAdsObjectAdSet; use FacebookAdsObjectAdCreative; use ..

Read more

I try test graphql in php ,I install 3 packages webonyx/graphql-php, leocavalcante/siler and overblog/dataloader-php , now when I create file schema.php and when I launched test example I found this error: Fatal error: Uncaught Error: Call to undefined function SilerGraphqlschema() in C:xampphtdocsphp-graphqlschema.php:8 Stack trace: #0 {main} thrown in C:xampphtdocsphp-graphqlschema.php on line 8 code schema.php: <?php ..

Read more