Forums

#1 2009-11-06 03:56:14

evilbitz
Member
From: Israel
Registered: 2008-10-03
Posts: 80
Website

Fb:bookmark

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...


Bodybuilderz WARs - a bodybuilding game!

Offline

 

#2 2009-11-06 04:22:47

zerostar07
Member
From: Crete
Registered: 2008-02-29
Posts: 1920
Website

Re: Fb:bookmark

also, it would be nice if there was something like fb:if-not-bookmarked


-George

Offline

 

#3 2009-11-06 05:31:26

evilbitz
Member
From: Israel
Registered: 2008-10-03
Posts: 80
Website

Re: Fb:bookmark

Agree!


Bodybuilderz WARs - a bodybuilding game!

Offline

 

#4 2009-11-06 05:49:23

anatolyl
_Moderator_
From: Israel
Registered: 2007-10-16
Posts: 3782
Website

Re: Fb:bookmark

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.


Anatoly Lubarsky

Offline

 

#5 2009-11-06 05:59:28

evilbitz
Member
From: Israel
Registered: 2008-10-03
Posts: 80
Website

Re: Fb:bookmark

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.


Bodybuilderz WARs - a bodybuilding game!

Offline

 

#6 2009-11-06 06:09:16

anatolyl
_Moderator_
From: Israel
Registered: 2007-10-16
Posts: 3782
Website

Re: Fb:bookmark

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?


Anatoly Lubarsky

Offline

 

#7 2009-11-06 06:35:38

evilbitz
Member
From: Israel
Registered: 2008-10-03
Posts: 80
Website

Re: Fb:bookmark

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...).


Bodybuilderz WARs - a bodybuilding game!

Offline

 

#8 2009-11-06 12:33:07

anatolyl
_Moderator_
From: Israel
Registered: 2007-10-16
Posts: 3782
Website

Re: Fb:bookmark

@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.


Anatoly Lubarsky

Offline

 

#9 2009-11-16 12:22:38

stupakov
New Member
Registered: 2009-11-13
Posts: 4

Re: Fb:bookmark

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

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson