Search Results

Search found 10 results on 1 pages for 'serverfbml'.

Page 1/1 | 1 

  • define javascript functions on iframe facebook app inside <fb:serverfbml> tag

    - by user233486
    Hi all, How we can define JS function on inside ? I tried to load file javascript on the end tag , but I still can't call the function from javascript file. Here the FBML tag <fb:serverfbml> <script type="text/fbml"> <fb:fbml> <a href="#" id="this" onclick="do_colors(this); return false">Hello World!</a> <script src="http://absolute.path.to/your/javascript/file.js"></script> </fb:fbml> </script> </fb:serverfbml> And here the javacript function on file.js function random_int(lo, hi) { return Math.floor((Math.random() * (hi - lo)) + lo) } function do_colors(obj) { var r = random_int(0, 255), b = random_int(0, 255), g = random_int(0, 255); obj.setStyle({background: 'rgb('+[r, g, b].join(',')+')', color: 'rgb('+[r<128?r+128:r-128, g<128?g+128:g-128, b<128?b+128:b-128].join(',')+')'}); } I use rails and facebooker to develop the application Any idea or suggestion for define javascript functions? Thanks,

    Read the article

  • Facebook, iframe app, fb:request-form, action attribute problem

    - by Unreality
    Hi all, I'm making a facebook iframe application I'm making a request form with my own form data. What should I do in order to process the data? If I put action="http://apps.facebook.com/[appName]/abc.php" , i.e. <fb:serverfbml> <script type="text/fbml"> <fb:fbml> <fb:request-form action="http://apps.facebook.com/[appName]/abc.php" method="post" type="abc" content="abc"> <textarea name="pm" fb_protected="true" ></textarea> <fb:multi-friend-selector showborder="false" max="35" actiontext="test" email_invite="true" bypass="cancel" /> </fb:request-form> </fb:fbml> </script> </fb:serverfbml> Then the result is funny... A facebook page inside the facebook app's iframe ! but if I put action="http://[my own domain / facebook connect url]/abc.php" , i.e. <fb:serverfbml> <script type="text/fbml"> <fb:fbml> <fb:request-form action="http://[my own domain / facebook connect url]/abc.php" method="post" type="abc" content="abc"> <textarea name="pm" fb_protected="true" ></textarea> <fb:multi-friend-selector showborder="false" max="35" actiontext="test" email_invite="true" bypass="cancel" /> </fb:request-form> </fb:fbml> </script> </fb:serverfbml> Then the result page will be rendered WITHOUT facebook template (that means losing all top facebook banner and bottom facebook bar like the facebook chats etc) Anyone knows what's wrong? Thanks a lot for reading

    Read the article

  • Facebook multi-friend-selector + new javascript API = BROKEN ?

    - by Simon_Weaver
    I am using the fb:serverfbml tag to render a multi-friend-selector inside an IFrame. I am using the new javascript API. I have been trying ALL DAY to get it working. When I click on the underlines 'selected' link (to filter by the selected friends) the whole page refreshes and the selected friends disappear. Does the multi-friend-selector just not work with the javascript API? <fb:serverfbml> <script type="text/fbml"> <fb:request-form action="http://apps.facebook.com/rollingrazor/" target="_top" method="POST" invite="true" type="Blah blah blah" content="Blah blah! &lt;fb:req-choice url=&quot;http://apps.facebook.com/rollingrazor/&quot; label=&quot;Let me check my friends&quot; /&gt;"> <fb:multi-friend-selector showborder="false" actiontext="Invite your friends" rows="5" cols="5" bypass="cancel" target="_top" /> </fb:request-form> </script> </fb:serverfbml> <div id="fb-root"></div> <script> window.fbAsyncInit = function () { FB.init({ appId: 'xxxxxxx', status: true, cookie: true, xfbml: true }); }; (function () { var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; document.getElementById('fb-root').appendChild(e); } ()); </script> Can someone give me a working example using new javascript API with a multi-friend-selector?

    Read the article

  • FBML is not rendered in Facebook App in iframe - please help

    - by Jakob
    I'm developing an Facebook Application in PHP. It's loaded as an iframe and not as FBML. The normal interaction with Facebook works. For example the following code gives the username: $facebook = new Facebook($config->appapikey, $config->appsecret); $user_id = $facebook->require_login($required_permissions = 'email'); echo $user->name; Where $user is my class in which the user-details are loaded from facebook. My document begins the following way: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> <head><title>Appname</title> </head> <body> <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/de_DE" type="text/javascript"></script> And ends likes this: <script type="text/javascript"> FB_RequireFeatures(['XFBML','CanvasUtil'], function(){ FB.init("<?php echo $config->appapikey; ?>", "/app/xd_receiver.htm"); FB.CanvasClient.startTimerToSizeToContent(); }); </script> </body> </html> Also the file xd_receiver.htm is loaded as I can see in Firebug. But my problem is that for example the request-form is not loaded. My code: <fb:serverFbml> <script type="text/fbml"> <fb:fbml> <fb:request-form method="post" action="<?php echo $config->site; ?>index.php" type="appname" invite="true" target="_top" content="content"> <fb:multi-friend-selector actiontext="text" rows="3" showborder="true" target="_top"/> </fb:request-form> </fb:fbml> </script> </fb:serverFbml> I can see the code with Firebug but the form ist not displayed by Facebook. 2 or 3 weeks ago it was displayed but in this time I had the tags </fb:fbml> </script> </fb:serverFbml> arround my complete text in the body. 2 weeks ago I had the the problem that nothing any more was displayed. After I removed the tags my app is displayed but not the form. I am searchign the web vor 1 week now and read many Threads about FBML and XFBML in Facebook but nothing worked for me. So thank you in advance for help.

    Read the article

  • Facebook API friends_get is extremely slow

    - by IkimashoZ
    I have a PHP application running in iFrame mode. I am rendering an <fb:multi-friend-selector condensed="true"> inside of <fb:serverfbml> tags. This is inside a PHP file that calls a function that gets a list of user IDs using $facebook->api_client->friends_get();. The multi-friend selector renders just fine, but, when I leave the friend_get() call uncommented, the page takes between 15-20 seconds to load (confirmed with Firebug)! The goal is to limit the number of users displayed in the selector by building a list of user ids not to display, for use in the friend selector's exclude_ids parameter. And since it's "exclude_ids" and not "include_ids", I can't think of a way of getting around this api call. It seems to me there must be something I can do to make the api call faster, because I've seen friend selectors that load much more quickly.

    Read the article

  • Invite friends from facebook on my application using facebook api

    - by Seema
    Hello all, I create a application which allow user integration through facebook(connect with facebook).when user sign-in in application , i want to show all facebook friends of sign-in user for invite them to join my application. In current i am using multi friend selector for invite friends. <fb:serverfbml width="615"> <script type="text/fbml"> <fb:request-form action="action url" method="POST" invite="true" type="invite" content=" my message"> <fb:multi-friend-selector showborder="true" bypass="cancel" cols=3 email_invite="false" import_external_friends="false" actiontext="Invite your friend from facebook"/> </fb:request-form> </script> </fb:serverfbml> I want to customize mult friend selector 1 Can change css and show all friend in a single column? 2 can i show disable the friends whose are already connect with my application? please give your suggestion or if any other option for this. Thanks

    Read the article

  • Facebook failing on XFBML call using Yii Framework

    - by Wenzi
    I have used this same call in other IFRAME Facebook apps, but it gives me nothing at all in terms of output. I am trying it on Yii and getting nothing. <script type="text/javascript"> window.onload = function() { FB_RequireFeatures(["XFBML"], function() { FB.init('xxxxxx', 'xd_receiver.htm'); FB.XFBML.Host.get_areElementsReady().waitUnitlReady(function() { document.getElementById("container").style.visibility = "visible"; }); }); }; </script> <script type="text/javascript"> function publish() { FB_RequireFeatures(["Connect"], function() { FB.init('xxxxxx', 'xd_receiver.htm'); FB.ensureInit(function() { FB.Connect.streamPublish(); }); }); } </script> <fb:serverFbml style="width: 755px;"> <script type="text/fbml"> <fb:fbml> <fb:request-form action="http://apps.facebook.com/ixxxx" method="POST" invite="true" type="rrrrr" content="rrrrr <?php echo htmlentities("<fb:req-choice url=\"http://apps.facebook.com/XXXX\" label=\"Authorize My Application\"") ?>" > <fb:multi-friend-selector showborder="false" actiontext="Invite your friends to use SuperThief."> </fb:request-form> </fb:fbml> </script> </fb:serverFbml>

    Read the article

  • Disable redirect in fb:request-form Send/Cancel button

    - by Colossal Paul
    Hi, How do I disable the redirect in Facebook's invite form? <fb:serverfbml style="width: 600px; height: 650px;"> <script type="text/fbml"> <fb:request-form action="index.php" method="POST" invite="true" type="MyApp" content="Please have a look. <fb:req-choice url='http://apps.facebook.com/myapp/' label='View Now!' />"> <div class="clearfix" style="padding-bottom: 10px;"> <fb:multi-friend-selector condensed="true" style="width: 600px;" /> </div> <fb:request-form-submit /> </fb:request-form> After selecting friends, you will see the final Send Invite dialog with your template. After you click send or cancel, how do i disable the redirect by just closing the the dialog? Thanks.

    Read the article

  • Disable redirect in fb:request-form Send/Cancel button

    - by Colossal Paul
    How do I disable the redirect in Facebook's invite form? <fb:serverfbml style="width: 600px; height: 650px;"> <script type="text/fbml"> <fb:request-form action="index.php" method="POST" invite="true" type="MyApp" content="Please have a look. <fb:req-choice url='http://apps.facebook.com/myapp/' label='View Now!' />"> <div class="clearfix" style="padding-bottom: 10px;"> <fb:multi-friend-selector condensed="true" style="width: 600px;" /> </div> <fb:request-form-submit /> </fb:request-form> After selecting friends, you will see the final Send Invite dialog with your template. After you click send or cancel, how do i disable the redirect by just closing the the dialog? Thanks.

    Read the article

1