Google Fb Friend Selector

<fb:serverFbml style="width: 240px;"> <form method="post" action="/friend-selector" id="friend-selector"> <script type="text/fbml"> <fb:fbml> <fb:friend-selector uid="xxxxx" name="uid" idname="friendselector_s"/> </fb:fbml> </script> <INPUT type="submit" value="submit" class="submit" /> </form> </fb:serverFbml> 

In the backend, I try to get friends id:

 def post(self): logging.info(self.request.POST) ss=self.request.POST[u'friendselector_s'] logging.info(ss)` 

So, I'm wrong.

 Traceback (most recent call last): File "C:\Program Files\Google\google_appengine\google\appengine\ext\webapp\__init__.py", line 702, in __call__ handler.post(*groups) File "D:\Workspace\main.py", line 142, in post ss=self.request.POST[u'friendselector_s'] File "C:\Program Files\Google\google_appengine\lib\webob\webob\multidict.py", line 302, in __getitem__ return self._decode_value(self.multi.__getitem__(key)) File "C:\Program Files\Google\google_appengine\lib\webob\webob\multidict.py", line 77, in __getitem__ raise KeyError(key) 

I am using this code on facebook using goine app egine on backend. When collecting data in the backend, I did not get the identifier. In general, I do not get the selected freind id. I also need data in javscript side.

+8
javascript jquery google-app-engine facebook-graph-api
source share
1 answer

You should use the new application request JavaScript function to send requests instead of the legacy version of FBML. You can make a simple request using:

 FB.ui({method: 'apprequests', message: 'My Great Request', }, requestCallback); 

Facebook request documentation can help you further.

+1
source share

All Articles