Great addition!
It was nice if you could control the text on it,
Instead of using the default "Add bookmark" text I would like to change it to just "Bookmark" so it will consume less space...
Offline
also, it would be nice if there was something like fb:if-not-bookmarked
Offline
Offline
zerostar07 wrote:
also, it would be nice if there was something like fb:if-not-bookmarked
all fb:if tags have a smell of just bad design, not to mention it is supposed to be very slow.
I prefer the button is not rendering at all in case the app is already bookmarked.
Offline
anatolyl wrote:
all fb:if tags have a smell of just bad design, not to mention it is supposed to be very slow.
I prefer the button is not rendering at all in case the app is already bookmarked.
Why is it bad design?
All these <fb:if> tags are there to allow you to control the presentation layer but still hiding from your app, at least in theory, the ability to test whether a user performed an action or not (so you wouldn't incentivize users for these things).
Regarding the ability to check for bookmarks, as they wrote on the developer blog post, you can make a FQL query in order to check whether a user bookmarked your app, this makes your loading time a bit slower than using a <fb:if> tag.
Offline
evilbitz wrote:
anatolyl wrote:
all fb:if tags have a smell of just bad design, not to mention it is supposed to be very slow.
I prefer the button is not rendering at all in case the app is already bookmarked.Why is it bad design?
All these <fb:if> tags are there to allow you to control the presentation layer but still hiding from your app, at least in theory, the ability to test whether a user performed an action or not (so you wouldn't incentivize users for these things).
Regarding the ability to check for bookmarks, as they wrote on the developer blog post, you can make a FQL query in order to check whether a user bookmarked your app, this makes your loading time a bit slower than using a <fb:if> tag.
Take for example if:section-added, it is very slow + there is much faster call in javascript which renders the button and also checks if it is added, see showAddSectionButton, etc (the good example of better design for the same thing).
Regarding whether it is slower with FQL - I doubt it, since facebook has to reparse fb:if, etc.
Anyway how can you state it is slower if the tag is not available at all?
Offline
anatolyl wrote:
Regarding whether it is slower with FQL - I doubt it, since facebook has to reparse fb:if, etc.
Anyway how can you state it is slower if the tag is not available at all?
It is slower by design.
Assuming a user is requesting a page from your app -
FB calls your callback url and your web server is making the API call, another TCP request is made and it takes around 400ms to complete (from what I've seen for simple API calls, this is why you should batch them). After it completes your server returns the content to the FB server and then it is parsed for FBML, then the page contents are returned to the user.
By the way, my round-trip time to api.facebook.com is ~55ms, that's from Chicago.
At the statistics section at the developer app you can see the FBML rendering time (~100ms for all FBML tags), most of the latency in user requests then isn't affected by FBML rendering, it is rather affected by the bandwitdth.
If you will use a <fb:if> tag it should take really much less time to achieve the same functionality (my guess it will take around 20ms since they keep open connections IMO, etc...).
Offline
@evilbitz
1) facebook should show/hide button on its own (like it already does in showAddSectionButton method), devs don't need to issue FQL for this.
2) what you are talking about maybe correct only for FBML apps, but there are other options.
Offline
Hi,
I would also like to be able to determine whether a user has my app bookmarked. I looked through the API and FQL documentation and couldn't find any mention of bookmarking. Could someone please point me to the documentation or show the API call or FQL query for this?
Thanks.
Alex
Offline