Static Map in Facebook feed

813 views
Skip to first unread message

Nea

unread,
Aug 20, 2010, 10:10:13 AM8/20/10
to Google Maps JavaScript API v3
I have a rather unique problem. We have an application which uploads
static Google Map images to a user's Facebook Wall. This works really
neat except for one thing, sometimes the map isn't shown in the feed
even though the link to the Google Maps is correct.

Consider the following map for example:

http://maps.google.com/maps/api/staticmap?markers=color:blue|55.684318,13.17488&key=ABQIAAAAjvof_rFK2zvwuB3AuRwmHRTXAhPPf4CNr6kME-1EeFs5ozKZkRTnYNx6-wsEs6ZkqbWLoquP507vVQ&sensor=false&size=90x90&zoom=10

This image didn't pop up in the user's feed.

After some investigation I found out that if you remove the zoom bit
at the end of the link (&zoom=10) the map would be seen in the feed.

I tried to decrease and increase the zoom level but the result is the
same. Why is that so? I don't understand why it won't show in the feed
and what can be done to get around it? Because it works for most maps
and we need to zoom out the static map to city level so it makes sense
in the feed.

Any help or ideas is appreciated! :)

Miguel Angel Vilela

unread,
Aug 20, 2010, 10:32:48 AM8/20/10
to google-map...@googlegroups.com

Try removing the key, because:
- it's not required for the Static Maps API V2 that you're using
- it will be matched against the URL you're visiting, which may or may not be facebook.com


--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


Nea

unread,
Aug 23, 2010, 3:45:41 AM8/23/10
to Google Maps JavaScript API v3
@Miguel

Thanks for the reply. I tried what you said and the first time the map
wasn't shown in the facebook feed, but the second and third time it
was shown. So it doesn't seem to entirely solve the problem, put
perhaps it will make it happen less frequent so I'll remove the key
from now on.

Miguel Angel Vilela

unread,
Aug 23, 2010, 6:02:51 AM8/23/10
to google-map...@googlegroups.com

Did you try with a brand new Static Map image never used before?

Caching may be tricking you otherwise.


--

Daxon

unread,
Jun 29, 2011, 11:38:16 AM6/29/11
to google-map...@googlegroups.com
I have the same problem.

They just never appear with programatic publishes to the fb graph.
They sometimes work in a share link scenario. E.g. Posting a link on facebook itself, or sharing with JS on the actual page

I tired Bing static maps aswell, doesn't work.

Any hope with this? 

Rossko

unread,
Jun 29, 2011, 2:23:15 PM6/29/11
to Google Maps JavaScript API v3
> Any hope with this?

I doubt it, no-one else can see your demonstration of the problem.

Daxon

unread,
Jun 29, 2011, 5:50:24 PM6/29/11
to google-map...@googlegroups.com

Using the restfb.com API I'm posting to the users FB wall.

The Google image url is made, the link works in the browser, but not when posted to the fb service.
 
def image = "http://maps.google.com/maps/api/staticmap?center=${event.latitude},${event.longitude}&zoom=13&size=110x110&markers=color:red|size:mid|${event.latitude},${.event.longitude}&sensor=false"

                                   FacebookType publishMessageResponse = facebookClient.publish("me/feed", FacebookType.class,
                                       Parameter.with("picture", image.toString()),
                                       Parameter.with("link", eventLink),
                                       Parameter.with("name", "name"),
                                       Parameter.with("caption", "caption"),
                                       Parameter.with("description", "description"),
                                       Parameter.with("actions", ["name": userName, "link": profileLink]))

 

Rossko

unread,
Jun 29, 2011, 8:16:17 PM6/29/11
to Google Maps JavaScript API v3
Doesn't really help. What counts is what gets delivered to the end-
viewers browser, and no-one has yet revealed that or given anyone an
opportunity to see.

en4ce

unread,
Jun 30, 2011, 5:59:18 AM6/30/11
to Google Maps JavaScript API v3
haha, i have the same problem, some times it works, sometimes not, i
gave up to understand this, the pic is always available anyways *gosh

do you know facebook lint? there you can check the behavior quite
well: http://developers.facebook.com/tools/lint/

en4ce

unread,
Jun 30, 2011, 6:00:55 AM6/30/11
to Google Maps JavaScript API v3
you can see some examples there, http://www.facebook.com/profile.php?id=100000318414658

the main problem is that facebook parse the link as well (so the
picture is not being loaded in the profile), i think the error is
within fb ;)

On 30 Jun., 02:16, Rossko <ros...@culzean.clara.co.uk> wrote:

Rossko

unread,
Jun 30, 2011, 2:34:46 PM6/30/11
to Google Maps JavaScript API v3
I don't see any static map there. I checked the source, and there is
no <img> or other tag with a static map href.
Message has been deleted

en4ce

unread,
Jun 30, 2011, 3:29:07 PM6/30/11
to Google Maps JavaScript API v3

Andrew Leach

unread,
Jun 30, 2011, 3:42:51 PM6/30/11
to google-map...@googlegroups.com

That second one does work for me (second time, after viewing the first
one). I don't have a Facebook account -- but it doesn't look as though
that's relevant here anyway.

Perhaps Facebook is simply unreliable at including the image.
Sometimes, it doesn't work.

Rossko

unread,
Jun 30, 2011, 4:54:35 PM6/30/11
to Google Maps JavaScript API v3
> here it works:
>
> http://developers.facebook.com/tools/lint/?url=http%3A%2F%2Fwww.yousp...

Oddly, it didn't for me. Or at least, the thumbnail on the 'URL
Linter' page didn't.
If I click the thumbnasil's placeholder rectangle, it opens a link to
the "real" static map which works just fine - for me. Does that work
for everybody else?? If so, then Static Maps works fine.

What is supposed to be shown in the preview/thumbnail isn't a static
map, its some image served from Facebook
<img class="img" width="50" alt="" src="http://external.ak.fbcdn.net/
safe_image.php?d=AQAFP-1nW .... etc.

Of course it is supposed to be the static map, but as fetched and
processed and maybe cached by FB servers.

I'll hazard a guess that FB servers are going over quota and don't
always get an image from static maps. So far as I can tell, static
maps aren't intended to be processed server-side, in fact that is
prohibited for ordinary people.

en4ce

unread,
Jun 30, 2011, 5:09:34 PM6/30/11
to Google Maps JavaScript API v3
and you are most likely 100% percent right with that (as usual), this
was my conclusion as well BUT this is annoying ^^ so i guess we should
write the fb support/forum?

Rossko

unread,
Jun 30, 2011, 8:07:05 PM6/30/11
to Google Maps JavaScript API v3
> so i guess we should
> write the fb support/forum?

Probably.
*if* the problem is about quotas, you may be able to ask Google to
'whitelist' Facebook's servers. Of course they might say "no, that
isn't an intended usage"

But perhaps it isn't about that - perhaps something else upsets FB,
like a slow response. I doubt its about URL lengths or character
content or it would be consistent for a given map... unless ...
Possibly it's only one or two out of many FB servers that have an
issue, I guess thay must have a distributed platform.

You really need to know what problem FB servers perceive when fetching
static maps, and only FB will tell you that.

en4ce

unread,
Jul 1, 2011, 6:10:39 AM7/1/11
to Google Maps JavaScript API v3
>>You really need to know what problem FB servers perceive when fetching
static maps, and only FB will tell you that.

i tried to figure it out, the length of the url is not the problem, i
played a lot on that but the result stay´s the same, maybe there are
servers within fb that break the thing, maybe not.... i see if i can
find a forum within fb and ask the needed questions, if ill find
something useful ill post it up here

cheers! thanks for the effort
Reply all
Reply to author
Forward
0 new messages