Talk:Profile.setInfo
From Facebook Developer Wiki
It seems that the Info tab will only show the first field when you set the type parameter to 5 (thumbnail).
For example, with the following code (from the "tutorial"):
<?php
function get_sample_info() {
return array(
array('field' => 'Good Smilies',
'items' =>
array(array('label'=> 'Happy',
'image' => IMAGE_LOCATION . 'smile0.jpg',
'sublabel'=>'',
'description'=>'The original and still undefeated.',
'link'=>'http://www.facebook.com'),
array('label'=>'Indifferent',
'image'=> IMAGE_LOCATION . 'smile1.jpg',
'description'=>'meh...',
'link'=>'http://www.facebook.com'),
array('label'=>'Sad',
'image'=> IMAGE_LOCATION . 'smile2.jpg',
'description'=>'Oh my god! you killed my dog!',
'link'=>'http://www.facebook.com'),
array('label'=>'Cool',
'image'=> IMAGE_LOCATION . 'smile3.jpg',
'link'=>'http://www.facebook.com',
'description'=>'Yeah. whatever'))),
array('field'=> 'Bad',
'items'=>
array(array('label'=> 'Evil',
'link'=>'http://www.evil.com'))));
}
$info_fields = get_sample_info();
$fb->api_client->profile_setInfo('My Smileys', 5, $info_fields, $user);
?>
When I view the Info tab I see only the 'Good Smilies' field, and the not the Bad' field. However, when I change the 'type' parameter to 1, I see both.
Can someone from Facebook confirm this behavior?
- I spoke with the engineer who created Smiley and he confirmed that this is expected behavior. -- Pete User:563683308
- Man, that does not seem like the desired behavior! Why even support multiple fields for thumbnail types? -- Brian User:845013
- True... also, i'd like to have a field with images, and another without images, and that does not seem possible... ThaNerd 16:49, 6 January 2009 (PST)
[edit] Show how this looks in rest call
I'm a Java developer. What is the format of the info_fields when you make the rest call?
[edit] Ill-conceived API
This API is ill-conceived in several ways.
- You can only get ONE user's Info section at a time. So you can't do much interesting in the way of comparing friends' info sections.
- You can only set ONE user's InfoOptions at a time. If you have 6 million users, and you add a new item they can add, you'd have to call setInfoOptions 6 million times.
- A type-ahead is most useful for something with MANY choices. You'd have to cram ALL those choices into a setInfoOptions call in one go, no matter how many you have. (I happen to have 500,000, and growing).
- You need the current user logged in to see their Info section, but having a friend's key isn't enough. Never mind that the info is what you put there in the first place, and the friend can see it with their eyeballs.
There is a lot of potential here.
Sadly, the architecture is un-scalable and un-wieldy to the point of making this feature nothing more than yet another silly toy. --1573391613 10:17, 15 May 2009 (PDT)
[edit] Not a sessionless API
This method will not work without a session. It returns successfully, but does nothing. Technically, this is a bug - but if I reported every problem I'd be doing nothing else.
Please will someone confirm then change the documentation? --640515831 09:12, 6 September 2009 (PDT)
- I checked the code, then verified with the engineer to double check, but this method doesn't require a session key. Please file a bug. Pete (563683308 12:16, 8 September 2009 (PDT))
