views:

641

answers:

3

I have a simple IFRAME based facebook app, with everything set up for XFBML (it's working by the way), and I want a link to add a Facebook bookmark. It sounds simple but it really doesn't seem to be.

doesn't show anything, even though other tags render, so I was looking at doing it with a link instead, the way the Facebook developer app does at the top.

If I user a link to

"http://www.facebook.com/fbml/ajax/uiserver.php?method=bookmark.add&app_id=XXX&display=async"

Then I can open the bookmark form in a full window, but what I really want is to do it in an ajax pop-up, the way Facebook and the developer app do. However when I call the same url with $.get from Jquery it displays nothing.

Any ideas? What's the right way to do this?

+2  A: 

All you should have to do is use <fb:bookmark></fb:bookmark>. More information here:

http://developers.facebook.com.iproxy.saverpigeeks.com//docs/guides/canvas/#bookmarks

Under "bookmarks and counters". Or is that maybe what you had above, but the tag got stripped out of your question?

What's with the iproxy.saverpigeeks in the URI you put in?
weotch
A: 

I've tried the tags and all that happens is a pop-up opens with an error "An error occurred with XXX. Please try again later."

I'm not using php and those are the only things I see posted. Any thoughts?

Alison
A: 

Turns out that this is a known Facebook bug that was first reported in April:

http://bugs.developers.facebook.net/show_bug.cgi?id=11423

They haven't gotten to it yet, and it's currently assigned their lowest priority, but I'm sure some more votes on the issue wouldn't hurt.

In the meantime, I haven't tested this but a workaround appears to be showing an image of the bookmark and doing the dialog JavaScript yourself (from www.devcomments.com/trouble-with-fb-bookmark-to182399.htm):

<img src="bookmark.png" onclick="FB.Connect.showBookmarkDialog()" style="cursor:pointer;" />
Brendan