开发者

Android Facebook API wall post with image url not working

This code WAS working fine, but suddenly stopped showing the map thumbnail from either Bing or Google static maps.. Any ideas? Did Facebook change their own parsing of the picture urls?

Bundle parameters = new Bundle();
parameters.putString("message", et_message.getText().toString());   
parameters.putString("description", "Currently Near");
parameters.putString("picture","http://maps.google.com/maps/api/staticmap?center=36.837812,-76.022045&zoom=15&size=110x110&sensor=false&maptype=hybrid&markers=color:blue|36.837812,-76.022045");
parameters.putString("caption", lStreet + " - " + lCity +", "+ lState + " :  "+ lPhone);
parameters.putString("name", lName);
if(lUrl != null){parameters.putString("link", lUrl);}
mAsyncRunner.request("me/feed", parameters,"POST", new myPostListener(), 1);

Now the Wall Post on my Facebook seems to be ch开发者_StackOverflow中文版anging the link to combine parts of the LINK url, along with the image URL. I don't have a clear example of this that I can post, but a rough example is:

link = http://foo.bar/
picture = http://somemaps/image1.jpg

Result when hovering over the broken image on Facebook is something like:

http://apk.facebook/http://somemaps/image1.jpg

I don't get why Facebook isn't just using my raw picture Url in the first place!? Grrrrr

Anyone else having problem posting images to facebook wall, where image is a realtime generated image from Bing Maps, or Google Static Maps API?


I was having a similar issue and after a long debugging session it was due to me not providing a link and name attribute along with the picture attribute. I was just sending in message and picture but I think Facebook changed the way you can post pictures in a post recently because this did work about a month ago when I was testing.... Make sure they are all included in your post to Facebook. To post a picture you have to post to /me/photos, can't just send in a link unless you want it displayed as a "Facebook Link". Hope that helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜