facebook-php-sdk

Facebook Attribution API - List of attribution channels

若如初见. 提交于 2021-02-05 09:16:07
问题 I am really having a very hard time to use Facebook Attribution API. On the documentation it is mentioned that we can break your results down by source_channel but those channels are really general (picture bellow) Would it be possible to breakdown based on the top sources listed on https://business.facebook.com/attribution/<BUSINESS_ID>/performance ? 来源: https://stackoverflow.com/questions/65910864/facebook-attribution-api-list-of-attribution-channels

How to backend-upload a video to Facebook, but with scheduled publish

时光总嘲笑我的痴心妄想 提交于 2021-01-29 05:00:36
问题 I have a php console script which uploads a video file to my Facebook Page. This works fine (code below). However when this finishes, the video is immediately available publicly. I would like to publish the video at a certain datetime. I couldn't find the proper documentation for this. Is it available anywhere? Alternatively, if I could upload the video available only to me, and then "turn it public", that would suit me also. <?php $fb = new Facebook\Facebook([ 'app_id' => '{APPID}', 'app

How to backend-upload a video to Facebook, but with scheduled publish

痴心易碎 提交于 2021-01-29 04:59:15
问题 I have a php console script which uploads a video file to my Facebook Page. This works fine (code below). However when this finishes, the video is immediately available publicly. I would like to publish the video at a certain datetime. I couldn't find the proper documentation for this. Is it available anywhere? Alternatively, if I could upload the video available only to me, and then "turn it public", that would suit me also. <?php $fb = new Facebook\Facebook([ 'app_id' => '{APPID}', 'app

Facebook Graph API not returning email

最后都变了- 提交于 2020-08-18 06:25:12
问题 I have the following code: $fb = new Facebook([ 'app_id' => $appId, 'app_secret' => $appSecret, 'default_graph_version' => 'v2.9', ]); $oAuth2Client = $fb->getOAuth2Client(); $tokenMetaData = $oAuth2Client->debugToken($accessToken); dump($tokenMetaData); $graphUser = $fb->get('/me?fields=first_name,last_name,email', $accessToken)->getGraphUser()->asArray(); dump($graphUser); The output for the above is the following: $metaData : [ "app_id" => "..." "application" => "My App Name" "expires_at"

Facebook Graph API not returning email

北城以北 提交于 2020-08-18 06:25:06
问题 I have the following code: $fb = new Facebook([ 'app_id' => $appId, 'app_secret' => $appSecret, 'default_graph_version' => 'v2.9', ]); $oAuth2Client = $fb->getOAuth2Client(); $tokenMetaData = $oAuth2Client->debugToken($accessToken); dump($tokenMetaData); $graphUser = $fb->get('/me?fields=first_name,last_name,email', $accessToken)->getGraphUser()->asArray(); dump($graphUser); The output for the above is the following: $metaData : [ "app_id" => "..." "application" => "My App Name" "expires_at"

Instagram Graph API: Media Thumbnail URL

若如初见. 提交于 2020-07-20 22:09:45
问题 I'm using the Instagram Graph API in a business account, and almost everything works just fine. I have created a WordPress port of the Facebook SDK, and the function that retrieves the media items looks like this (part of a class, the $fb object is already authenticated using the default_access_token in the class constructor): public function get_media( $business_account_id = '', $limit = 15 ) { $limit = absint( $limit ); try { $response = $this->fb->get( "/{$business_account_id}?fields=media

Instagram Graph API: Media Thumbnail URL

放肆的年华 提交于 2020-07-20 22:09:34
问题 I'm using the Instagram Graph API in a business account, and almost everything works just fine. I have created a WordPress port of the Facebook SDK, and the function that retrieves the media items looks like this (part of a class, the $fb object is already authenticated using the default_access_token in the class constructor): public function get_media( $business_account_id = '', $limit = 15 ) { $limit = absint( $limit ); try { $response = $this->fb->get( "/{$business_account_id}?fields=media

Instagram Graph API: Media Thumbnail URL

可紊 提交于 2020-07-20 22:08:26
问题 I'm using the Instagram Graph API in a business account, and almost everything works just fine. I have created a WordPress port of the Facebook SDK, and the function that retrieves the media items looks like this (part of a class, the $fb object is already authenticated using the default_access_token in the class constructor): public function get_media( $business_account_id = '', $limit = 15 ) { $limit = absint( $limit ); try { $response = $this->fb->get( "/{$business_account_id}?fields=media

Getting “(#100) Pages Public Content Access requires either app secret proof or an app token” issue when calling Facebook API?

旧街凉风 提交于 2020-05-29 03:23:34
问题 I am developing an app that syncs with users Facebook account and fetches Facebook page information. Initially, app ask's for Login with Facebook and gets page list. After getting pages I am calling API to get posts associated with each page. Once I get post details then I am calling insight API's to get insights of each post. This flow working fine with development mode but when I switch to Live mode I am getting following error Client error: `GET https://graph.facebook.com/v4.0

Facebook PHP SDK Graph API post to page not functioning properly

两盒软妹~` 提交于 2020-02-03 18:51:29
问题 I'm trying to add a feature to my app that will post a status to a admin user's page timeline with the same detail as if they posted on Facebook.com. The main feature I am focusing on is the link sharing and thumbnail images, like when you paste a link into your status and it auto-detects a thumbnail image, gives you a nice link, description, etc. I have tireless read through other forums and the Graph API documents, and I keep running into problems with the post showing as the admin user,