Jemand zu Hause?Leser: 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
#!/usr/bin/perl -w use strict; use URI; use LWP::Simple; use JSON; # imports encode_json, decode_json, to_json and from_json. use CGI; use CGI::Carp qw(fatalsToBrowser); my $cgi = new CGI; print $cgi->header( { -type=>'text/html'} ); my $access_token = 'XXXX'; my $response = get(build_query('https://graph.facebook.com/my/feed', #name => 'HEADER', #picture => 'http://my.de/image/img.jpg', access_token => $access_token, message => 'MESSAGE', link => 'http://my.de/', method => 'post' )); print "Feedback post: $response"; sub build_query { my $uri = URI->new(shift); $uri->query_form(@_); return $uri->as_string; } exit 0;
Tipp zum Debugging