In facebook connect, how can I check if a user is a fan of my facebook page? Is it possible to track? -


I am trying to determine if a user is a Facebook book fan or not. I load and launch the Facebook JS Library:

  & lt; Script type = "text / javascript" src = "Actiteepi://sthatik.akkknektkfesbukkcom/jas/apiai_lib/ V0k4 / Feccreloderkjaskphp / en_US" & gt; & Lt; / Script & gt; FB_RequireFeatures (["xfbml", "connect", "API"], function () {FB. IIT ("my_api_key", "xd_receiver.htm")}); FB.ensureInit (function () {FB.ApiClient.pages_isFan (my_profile_id, "some_UID", callback);});  

However, when I am FBI client to FBI Calling with API Client Pages, I get a JS error -

  FB API client is undefined  
& lt; I am also using FBML fan tags to become a fan: connection = "10" logobar = "1" Width = "300" & gt; & Lt; / Fb: fan & gt;

And when the "Become a fan" button is clicked or a user successfully becomes a fan, then he wants to be notified.

Business logic is very easy - if they become a fan, then track it in your database, and if they try to become a fan again, then check with the library that they are fans and say So if you're a fan, "you are already a fan," do not show the widget.

New Experiment:

  & lt; Fb: login-button perms = "user_likes" & gt; Allow permissions to access permissions & lt; / Fb: login-button & gt; & Lt; Button onclick = "checkDoesLike ()" & gt; Check that the user likes the page & lt; / Button & gt; & Lt; H1 & gt; Like this app's page & lt; / H1> & Lt; Fb: as-box profile-id = "184484190795" & gt; & Lt; / Fb: like-box & gt; & Lt; Script & gt; Window.checkDoesLike = function () {FB.api ({method: 'pages.isFan', page_id: '184484190795'}, function (resp) {if (resp) {Log.info ('you like the app.') ;} And {Log Panic ("You do not like the app.");}}); }; & Lt; / Script & gt;  

A work example:


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -