
perl4ever
New User
Dec 7, 2013, 6:36 AM
Post #1 of 1
(14635 views)
|
Perl Facebook::Graph posting AS Page, not as Admin/User
|
Can't Post
|
|
Using the Perl module, Facebook::Graph, I have created some basic perl code that can post to my own wall. I can share a photo on my own wall. I can also post a simple wall message to one of the pages for which I am an admin. However, when I try to post a photo to the page, it posts as me, not as the page. Here is the sample code that posts as me, to the Facebook page. I need it to post as the Page, not as me.
# previously, I obtained my Page's accesstoken, and other credentials # including the Facebook Page ID my $fb = Facebook::Graph->new( app_id => $facebook_application_id, secret => $facebook_application_secret ); $fb->access_token($facebook_accesstoken); my $rstring = $fb ->add_photo ->to($facebookPageID) ->set_message('Look at this really cool photo!') ->set_source('./raw_image_example.jpg') ->publish ->as_string; print "$rstring\n\n"; I am trying to figure out how to create a post to the wall of a Facebook page, as if it is being posted BY the page, not by me. I am trying to do that with the CPAN module, Facebook::Graph (see CPAN: http://search.cpan.org/~rizen/Facebook-Graph-1.0600/ ) I cannot, for the life of me, figure this out. Any help would be most welcomed!
|