PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, December 28, 2021

[FIXED] To update the cover in the face appears on the wall changed the picture, can I hide or delete this post with api?

 December 28, 2021     facebook, facebook-graph-api, facebook-page, facebook-php-sdk     No comments   

Issue

to update the cover in the face appears on the wall changed the picture, can i hide or delete this post with api ?.

      $json_object = $facebook->api($fanpage."/?  fields=cover&access_token=".$fanpage_token, 'get');
      echo $page_settings_url.'<pre>';
      print_r ($json_object);



      $json_object = $facebook->api($fanpage.'/'.$json_object['cover']['cover_id'],'delete');
      echo 'borrado'.$json_object;*/
      //echo $json_object['stdClass']['cover'];
      //$response = file_get_contents($page_settings_url);
      //$resp_obj = json_decode($response,true);

Solution

If my interpretation of your question is correct, you want to upload a page cover photo without a story appearing on the page's timeline?

This is covered in the Page API documentation - see the Setting a Cover Photo section

You can also add a no_feed_story parameter to the upload to suppress the news feed story.

So the code for uploading the cover photo would become:

$json_object = $facebook->api($fanpage."/? fields=cover&access_token=".$fanpage_token, 'POST', array('no_feed_story' => 1));



Answered By - Igy
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing