简体   繁体   English

Facebook图形API将照片张贴在Perl的墙上

[英]Facebook graph api to post photo on wall in perl

in perl i am using Facebook::Graph api to post on user wall as i am having aceess token and plain message is working 在perl中,我使用Facebook :: Graph api在我拥有aceess令牌且普通消息正常工作的情况下在用户墙上发布

my $fb = Facebook::Graph->new(
    app_id          => $app_id,
    secret          => $secret,
        );

        $fb->access_token( $access_token );



      $fb->add_post
         ->set_message($message)
         ->set_picture_uri("http://st.pimg.net/perlweb/images/lcamel.vcf3914e.gif")
         ->publish;

here message is posted with picture but what i need is instead of giving link in set_picture_uri i want to upload a file from local. 这里的消息与图片一起发布,但是我需要的不是在set_picture_uri中提供链接,而是要从本地上传文件。 Is it possible. 可能吗。

you probably need to build something on your own to upload file. 您可能需要自行构建一些文件才能上传文件。

But I assume Facebook might have API that asks for user to upload the file. 但是我认为Facebook可能具有要求用户上传文件的API。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM