Search Results

Search found 34187 results on 1368 pages for 'facebook javascript sdk'.

Page 11/1368 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Facebook Connect - Security Warning

    - by Skoder
    Hey all, I'm using Facebook connect using FBML tags. Although it works, when I run the site in Internet Explorer, a security warning comes up similar to this: The current webpage is trying to open a site in your Trusted sites list. Do you want to allow this? Current site: http://www.facebook.com Trusted site: http://localhost" My Facebook code involves these two: http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php http://static.ak.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.js I tried changing them to HTTPS: https://ssl.connect... but the errors still appear. None of my pages use SSL. I've also tried turning facebook-logo='false' but still no luck. Any ideas on how to fix this? Although it's not show-stopping, it doesn't give a good impression to users who may be feel it insecure. Thanks

    Read the article

  • invite friends in a dialog in a Facebook application

    - by Shani1351
    I'm trying to create a Facebook application that displays a friend invite dialog within the application using Facebook's Javascript API (FB.ui). To do that I followed this tutorial I have two problems : The action url I've put in the request-form is "http://apps.facebook.com/appname/post_invite.php" but I see that the iframe source after the post is "http://mydomain.com/post_invite.php" and when this iframe tries to do : parent.closeInviteWidget(); I get an error saying : "Permission denied for < http: //mydomain.com (document.domain has not been set) to get property Window.closeInviteWidget from < http:// apps.facebook.com (document.domain=< http:// facebook.com)." The skip button inside the request-form opens the action url in a new window (new browser tab) and not post to itself like the invite button. How can I fix those problems? -------------------- UPDATE : -------------------------------- I've tried to do what ifaour said and changed the code to : function inviteFriends(user_name, category_id, category_name) { url = appBaseUrl + "/index.php?category_id=" + category_id; req = "<fb:req-choice url='" + url + "' label='Authorize My Application' />"; content = user_name + " opened a new category called " + category_name + ". " + req; action = 'post_invite.php'; fbmi_text = '<fb:request-form action="' + action + '" target="_self" method="post" invite="true" type="Invite" content="' + content + '" <fb:multi-friend-selector showborder="false" actiontext="Invite yor friends" email_invite="false" import_external_friends="false" /> </fb:request-form>'; FB.ui({ method:'fbml.dialog', width:'750px', fbml:fbmi_text }); } When I use FireBug and look at the invite form it looks like this: <form id="req_form_4d20682f73ddb6e71722794" content="I've opened a new category called dsfsd. <fb:req-choice url='http://apps.facebook.com/appname/index.php?category_id=60' label='Authorize My Application' /> type="Invite" invite="true" method="post" target="_self" action="http://apps.facebook.com/appname/post_invite.php"> ... </form> But I still get the same error : Permission denied for <http://mydomain.com> (document.domain has not been set) to get property Window.closeInviteWidget from <http://apps.facebook.com> (document.domain=<http://facebook.com>)...

    Read the article

  • Show facebook status stream of a dedicated person on a website

    - by Pascal
    Hi all, I've been stomping at this all day :( I want to display a status feed of both twitter and facebook on my website. For twitter, this is not a problem, as my account is public, I can easily get the feed. Facebook however, is a whole different story! I can't seem to find an easy way to just get my last status updates and display it on my website. The code I currently have, needs authentication of the visitor, and I don't want that! This is my current code: $facebook = new Facebook($api_key, $secret); $stream = $facebook->api_client->fql_query("SELECT message,source,time FROM status WHERE uid = $user_id LIMIT 6"); I've seen several possible solutions, including the RSS feed, but as Facebook keeps changing the way their site works, none of the previous methods I've seen (including those from as late as januari) currently work! Is there anybody who can provide me with a currently working solution to this (simple?) problem?

    Read the article

  • Catching the Facebook Login Event to change the HTML of the parent page

    - by Arkid
    I am trying to create Facebook based login using Javascript. Once a person clicks a button he should get a div replaced by another div, if he is logged in to Facebook. However, if he is not logged in to Facebook he is asked his Facebook credentials and he logs in. However, we need the user to click the button once more for the div replacement to happen in this case. I want to know if there is a way in which I can catch the Facebook login event and change the div? Is polling a way or there is some other way out. I want to use only Javascript.

    Read the article

  • Is there a need for a Facebook specific page title?

    - by nute
    I see that Facebook's Open Graph asks you to have a meta property "og:title". Why don't they just use the HTML title tag? In my PHP code I started going through all page types and coding the og:title property. Then I realized, why don't I just set the og:title to the HTML page title? It would probably save me a lot of work... Am I missing something? In which cases would we want the og:title to be different?

    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

  • Problem with pre-beta sdk - even after reinstalling SDK 3.2

    - by Anders Brenna
    I'm trying to upload the binary for a new app, but always get this errormessage: "The binary you uploaded was invalid. A pre-release beta version of the SDK was used to build the application." I know several people have asked a similar question, but I've tried all suggestions from the answers there without success. I used the XCode 4.0 beta 3 during development, and I've tried using it to compile for earlier releases (3.0, 3.1.3, 3.2 etc...) I've also tried downgrading to SDK 3.2, as well as removing 4.0 beta 3 and then installing SDK 3.2 as a fresh install. It seems to me that there might be some parameter in the "Edit Project Settings" that is sticking from the use of 4.0 beta 3, but I've tried to identify them without success. My last option seem to be a complete reinstall of both OS and SDK. Is there something else I might try first?

    Read the article

  • Android Facebook SDK : post message without showing facebook page

    - by someone_ smiley
    I am trying to integrate Facebook to my Android app for social post. I have downloaded latest Facebook sdk from here and apply all setup require to post to facebook. Now i can post to facebook. But problem is that, when i run sample program from facebook sdk, a browser like page is open and user have to enter message himself there. but i dont want this page to showed up. i want a fixed message to post directly without opening facebook dialog box. But if there is noway to avoid this, please tell me how can i fixed certain part of message so that user can't modified it. Thanks in Advance Edit: this is message i got after using this project 04-10 11:44:34.691: I/dalvikvm(719): Failed resolving Lnet/xeomax/TestRocket/TestRocket; interface 22 'Lnet/xeomax/FBRocket/LoginListener;' 04-10 11:44:34.691: W/dalvikvm(719): Link of class 'Lnet/xeomax/TestRocket/TestRocket;' failed 04-10 11:44:34.691: D/AndroidRuntime(719): Shutting down VM 04-10 11:44:34.701: W/dalvikvm(719): threadid=1: thread exiting with uncaught exception (group=0x40015560) 04-10 11:44:34.781: E/AndroidRuntime(719): FATAL EXCEPTION: main 04-10 11:44:34.781: E/AndroidRuntime(719): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{net.xeomax.TestRocket/net.xeomax.TestRocket.TestRocket}: java.lang.ClassNotFoundException: net.xeomax.TestRocket.TestRocket in loader dalvik.system.PathClassLoader[/data/app/net.xeomax.TestRocket-1.apk] 04-10 11:44:34.781: E/AndroidRuntime(719): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569) 04-10 11:44:34.781: E/AndroidRuntime(719): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 04-10 11:44:34.781: E/AndroidRuntime(719): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 04-10 11:44:34.781: E/AndroidRuntime(719): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 04-10 11:44:34.781: E/AndroidRuntime(719): at android.os.Handler.dispatchMessage(Handler.java:99) 04-10 11:44:34.781: E/AndroidRuntime(719): at android.os.Looper.loop(Looper.java:130) 04-10 11:44:34.781: E/AndroidRuntime(719): at android.app.ActivityThread.main(ActivityThread.java:3683) 04-10 11:44:34.781: E/AndroidRuntime(719): at java.lang.reflect.Method.invokeNative(Native Method) 04-10 11:44:34.781: E/AndroidRuntime(719): at java.lang.reflect.Method.invoke(Method.java:507) 04-10 11:44:34.781: E/AndroidRuntime(719): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 04-10 11:44:34.781: E/AndroidRuntime(719): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 04-10 11:44:34.781: E/AndroidRuntime(719): at dalvik.system.NativeStart.main(Native Method) 04-10 11:44:34.781: E/AndroidRuntime(719): Caused by: java.lang.ClassNotFoundException: net.xeomax.TestRocket.TestRocket in loader dalvik.system.PathClassLoader[/data/app/net.xeomax.TestRocket-1.apk] 04-10 11:44:34.781: E/AndroidRuntime(719): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240) 04-10 11:44:34.781: E/AndroidRuntime(719): at java.lang.ClassLoader.loadClass(ClassLoader.java:551) 04-10 11:44:34.781: E/AndroidRuntime(719): at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 04-10 11:44:34.781: E/AndroidRuntime(719): at android.app.Instrumentation.newActivity(Instrumentation.java:1021) 04-10 11:44:34.781: E/AndroidRuntime(719): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561) 04-10 11:44:34.781: E/AndroidRuntime(719): ... 11 more

    Read the article

  • How to close the Facebook pop-up login window after the user Connects?

    - by alex
    Below is my code. For some reason, after the user logs into the little pop-up window, the little window will redirect back to '/" with a lot of session JSON junk at the end of the URL. How do I make it so that the little window closes, and my parent window refreshes? <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script> <fb:login-button v="2" onlogin='window.location("/test");' size="medium">Connect</fb:login-button> <script type="text/javascript">FB.init("XXXXX",'/xd_receiver.htm');</script>

    Read the article

  • Facebook Is it possible to grab a user's data and populate a form in an iframe?

    - by super9
    I am trying to create an iframe tab for a Facebook Page. On this page, I am loading in an iframe which consists of a form from another domain/site. Is it possible to use javascript to query the graph api to load the user's data into this iframe loaded form using javascript such that is appears pre-populated to the user? I am aware that there is a cross domain security issue. In that case, suppose that my iframe tab is now hosted on the same domain as the iframe loaded form, will this be doable now?

    Read the article

  • Facebook Application with .net Starting facebook toolkit

    - by AjmeraInfo
    i am new for facebook application please help me for how to start and what is basic steps for add application to facebook i have used facebook toolkit 3.1 beta version. but after authentication it will generated error... i want to create iFream application i want to craete gift send application. so which one is best iFream or FBML. Please it is urgent help me.

    Read the article

  • Block facebook from my website

    - by Joseph Szymborski
    I have a secure link direction service I'm running (expiringlinks.co). If I change the headers in php to redirect my visitors, then facebook is able to show a preview of the website I'm redirecting to when users send links to one another via facebook. I wish to avoid this. Right now, I'm using an AJAX call to get the URL and javascript to redirect, but it's causing problems for users who don't use javascript. Here are a number of ways I'd like to block facebook, but I can't seem to get working: I've tried blocking the facebook bot (facebookexternalhit/1.0 and facebookexternalhit/1.1) but it's not working, I don't think they're using them for this functionality. I'm thinking of blocking the facebook IP addresses, but I can't find all of them, and I don't think it'll work unless I get all of them. I've thought of using a CAPTCHA or even a button, but I can't bring myself to do that to my visitors. Not to mention I don't think anyone would use the site. I've searched the facebook docs for meta tags that would "opt-me out", but haven't found one, and doubt that I would trust it if I had. Any creative ideas or any idea how to implement the ones above? Thank you so much in advance!

    Read the article

  • ASP.NET JavaScript Routing for ASP.NET MVC–Constraints

    - by zowens
    If you haven’t had a look at my previous post about ASP.NET routing, go ahead and check it out before you read this post: http://weblogs.asp.net/zowens/archive/2010/12/20/asp-net-mvc-javascript-routing.aspx And the code is here: https://github.com/zowens/ASP.NET-MVC-JavaScript-Routing   Anyways, this post is about routing constraints. A routing constraint is essentially a way for the routing engine to filter out route patterns based on the day from the URL. For example, if I have a route where all the parameters are required, I could use a constraint on the required parameters to say that the parameter is non-empty. Here’s what the constraint would look like: Notice that this is a class that inherits from IRouteConstraint, which is an interface provided by System.Web.Routing. The match method returns true if the value is a match (and can be further processed by the routing rules) or false if it does not match (and the route will be matched further along the route collection). Because routing constraints are so essential to the route matching process, it was important that they be part of my JavaScript routing engine. But the problem is that we need to somehow represent the constraint in JavaScript. I made a design decision early on that you MUST put this constraint into JavaScript to match a route. I didn’t want to have server interaction for the URL generation, like I’ve seen in so many applications. While this is easy to maintain, it causes maintenance issues in my opinion. So the way constraints work in JavaScript is that the constraint as an object type definition is set on the route manager. When a route is created, a new instance of the constraint is created with the specific parameter. In its current form the constraint function MUST return a function that takes the route data and will return true or false. You will see the NotEmpty constraint in a bit. Another piece to the puzzle is that you can have the JavaScript exist as a string in your application that is pulled in when the routing JavaScript code is generated. There is a simple interface, IJavaScriptAddition, that I have added that will be used to output custom JavaScript. Let’s put it all together. Here is the NotEmpty constraint. There’s a few things at work here. The constraint is called “notEmpty” in JavaScript. When you add the constraint to a parameter in your C# code, the route manager generator will look for the JsConstraint attribute to look for the name of the constraint type name and fallback to the class name. For example, if I didn’t apply the “JsConstraint” attribute, the constraint would be called “NotEmpty”. The JavaScript code essentially adds a function to the “constraintTypeDefs” object on the “notEmpty” property (this is how constraints are added to routes). The function returns another function that will be invoked with routing data. Here’s how you would use the NotEmpty constraint in C# and it will work with the JavaScript routing generator. The only catch to using route constraints currently is that the following is not supported: The constraint will work in C# but is not supported by my JavaScript routing engine. (I take pull requests so if you’d like this… go ahead and implement it).   I just wanted to take this post to explain a little bit about the background on constraints. I am looking at expanding the current functionality, but for now this is a good start. Thanks for all the support with the JavaScript router. Keep the feedback coming!

    Read the article

  • Repeated calls with random Javascript append to the URL

    - by cjk
    I keep getting calls to my server where there is random Javascript appended on the end of lots of the calls, e.g.: /UI/Includes/JavaScript/).length)&&e.error( /UI/Includes/JavaScript/,C,!1),a.addEventListener( /UI/Includes/JavaScript/),l=b.createDocumentFragment(),m=b.documentElement,n=m.firstChild,o=b.createElement( /UI/Includes/JavaScript/&&a.getAttributeNode( /UI/Includes/JavaScript/&&a.firstChild.getAttribute( /UI/Includes/JavaScript/).replace(bd, /UI/Includes/JavaScript/)),a.getElementsByTagName( The user agent is always this: Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+CLR+2.0.50727) I have jQuery, Modernizr and other JS and originally thought that some browser was messing up it's JS calls, however this particular IP address hasn't requested any images so I'm wondering if it is some kind of attack. Is this a common occurence?

    Read the article

  • Getting error while connecting to facebook

    - by Bakhtiyor
    I have downloaded php-sdk for using facebook in php. I also created facebook application in the facebook web page in order to get API key and secret key. When I run example.php and try to connect to facebook it shows me the following error: Configuration errors: To fix this error, please set your Connect URL in the application settings editor. Once it has been set, users will be redirected to that URL instead of this page after logging in. I am using this php-sdk in the localhost. I tried to assign localhost as Connect URL but facebook doesn't accept it. I have read about Cross Domain Communication Channel and think this is what I need. But I don't know how to use it. Anyone can help me to solve this problem please? Update Actually what I need is following. I have Web Application and need to connect to facebook and search for users in facebook who has specific(user will specify this) Likes and Interests. Any idea about solving my problem?

    Read the article

  • How to get Facebook-Feeds in Trillian without connecting to Facebook-Chat?

    - by Protron
    I installed the trial of Trillian 5.0 Build 22 (I don't know if the version 4 Astra is any different). I successfully added my Facebook account so I can see my facebook news on Trillian and works great. The problem is that I don't want to use the Facebook-chat, and if I disconnect the Facebook-chat the rest of the facebook stuff (news, events, groups, request) also disappears. I tried by setting the Facebook status to Away; and I'm not sure if someone can chat with me if I choose that; but anyway I still have the contacts list full of people I don't want. EDIT: Maybe I wasn't clear enough about the Facebook part. And that might be why some people fell this is off-topic. But when I talk about Facebook in this question, I'm not referring to the Facebook site at any point. I'm mean the Facebook plugin of Trillian (and it's not an user plugin; it's a built-in plugin).

    Read the article

  • Facebook Connect 'next' error

    - by Mark
    I am trying to experiment with the new facebook authentication system, and I can't getthe login to work. I'm getting the following error message: API Error Code: 100 API Error Description: Invalid parameter Error Message: next is not owned by the application. The url that is being sent to facebook is: http://www.facebook.com/connect/uiserver.php?app_id=444444444444444&next=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23%3F%3D%26cb%3Df357eceb0361a8a%26origin%3Dhttp%253A%252F%252Fwww.mysite.com%252Ff38fea4f9ea573%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df23b800f8a78%26result%3DxxRESULTTOKENxx&display=popup&channel=http%3A%2F%2Fwww.mysite.com%2Ffbtester.php&cancel=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23%3F%3D%26cb%3Df6095a98598be8%26origin%3Dhttp%253A%252F%252Fwww.mysite.com%252Ff38fea4f9ea573%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df23b800f8a78%26result%3DxxRESULTTOKENxx&locale=en_US&return_session=1&session_version=3&fbconnect=1&canvas=0&legacy_return=1&method=permissions.request Note that the 'Next' variable in the url is: next=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23%3F%3D%26cb%3Df357eceb0361a8a%26origin%3Dhttp%253A%252F%252Fwww.mysite.com%252Ff38fea4f9ea573%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df23b800f8a78%26result%3DxxRESULTTOKENxx Any ideas what could be going wrong? All I've done is copy and paste the facebook login demo code from facebook's website: <?php define('FACEBOOK_APP_ID', 'your application id'); define('FACEBOOK_SECRET', 'your application secret'); function get_facebook_cookie($app_id, $application_secret) { $args = array(); parse_str(trim($_COOKIE['fbs_' . $app_id], '\\"'), $args); ksort($args); $payload = ''; foreach ($args as $key => $value) { if ($key != 'sig') { $payload .= $key . '=' . $value; } } if (md5($payload . $application_secret) != $args['sig']) { return null; } return $args; } $cookie = get_facebook_cookie(FACEBOOK_APP_ID, FACEBOOK_SECRET); ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> <body> <?php if ($cookie) { ?> Your user ID is <?= $cookie['uid'] ?> <?php } else { ?> <fb:login-button></fb:login-button> <?php } ?> <div id="fb-root"></div> <script src="http://connect.facebook.net/en_US/all.js"></script> <script> FB.init({appId: '<?= FACEBOOK_APP_ID ?>', status: true, cookie: true, xfbml: true}); FB.Event.subscribe('auth.login', function(response) { window.location.reload(); }); </script> </body> </html> Thanks for the help!

    Read the article

  • Extracting the source code of a facebook page with JavaScript

    - by Hafizi Vilie
    If I write code in the JavaScript console of Chrome, I can retrieve the whole HTML source code by entering: var a = document.body.InnerHTML; alert(a); For fb_dtsg on Facebook, I can easily extract it by writing: var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value; Now, I am trying to extract the code "h=AfJSxEzzdTSrz-pS" from the Facebook Page. The h value is especially useful for Facebook reporting. How can I get the h value for reporting? I don't know what the h value is; the h value is totally different when you communicate with different users. Without that h correct value, you can not report. Actually, the h value is AfXXXXXXXXXXX (11 character values after 'Af'), that is what I know. Do you have any ideas for getting the value or any function to generate on Facebook page. The Facebook Source snippet is below, you can view source on facebook profile, and search h=Af, you will get the value: <code class="hidden_elem" id="ukftg4w44"> <!-- <div class="mtm mlm"> ... .... <span class="itemLabel fsm">Unfriend...</span></a></li> <li class="uiMenuItem" data-label="Report/Block..."> <a class="itemAnchor" role="menuitem" tabindex="-1" href="/ajax/report/social.php?content_type=0&amp;cid=1352686914&amp;rid=1352686914&amp;ref=http%3A%2F%2Fwww.facebook.com%2 F%3Fq&amp;h=AfjSxEzzdTSrz-pS&amp;from_gear=timeline" rel="dialog"> <span class="itemLabel fsm">Report/Block...</span></a></li></ul></div> ... .... </div> --> </code> Please guide me. How can extract the value exactly? I tried with following code, but the comment block prevent me to extract the code. How can extract the value which is inside comment block? var a = document.getElementsByClassName('hidden_elem')[3].innerHTML;alert(a);

    Read the article

  • How to facebook getuser() after login with javascript SDK

    - by user1848205
    So I have to ask for extended permission by clicking the enter button, but after the login is necessary to refresh the page in order to display the app. Here's my code: <?php require 'facebook.php'; $facebook = new Facebook(array( 'appId' => '< THE APPID >', 'secret' => '< THE SECRET >', 'cookie' => true, )); $user = $facebook->getUser(); if ($user) { try { $user_profile = $facebook->api('/me'); } catch (FacebookApiException $e) { error_log($e); $user = null; } } ?> <body> <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ appId : '< THE APPID >', status : true, cookie : true, xfbml : true }); // Additional initialization code such as adding Event Listeners goes here $('#btn-enter').click(function(){ login(); }); }; (function(d){ var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0]; if (d.getElementById(id)) {return;} js = d.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_US/all.js"; ref.parentNode.insertBefore(js, ref); }(document)); function login() { FB.login(function(response) { if (response.authResponse) { // connected } else { // cancelled } //}); }, {scope: 'read_friendlists,friends_photos,publish_stream'}); } </script> <?php if ($user): ?> <!--Here is my APP--> <?php else: ?> <a id="btn-enter">Enter</a> <?php endif ?> Is there a better way to do this ? What works for me is: function login() { FB.login(function(response) { if (response.authResponse) { top.location.href='https://the_app_url'; } else { } //}); }, {scope: 'read_friendlists,friends_photos,publish_stream'}); } But this causes the entire page to refresh and is not 'elegant' per se...

    Read the article

  • Facebook Connect Post Feed from iPhone App without preview Broken!? URGENT!

    - by nephilite
    Hello All: I just downloaded the latest FBConnect build, popped in my keys and getting a mysterious hanging error only when I try to post a feed without previewing (setting preview to zero). The activity indicated disappears and the blank dialog window just hangs there. (This mirrors what I was getting on the app I was developing). If I try to post a feed with preview it works; set preview to zero it just hangs. Again; thats with the sample project "Publish Feed" button. Hitting getting permission button and then Publish Feed does same thing...... Other Developers have confirmed seeing this too...Apps that have previously had working feed posts have been broken for weeks. Discussions on facebook connect forum seem to be related to this. More Info Here: http://forum.developers.facebook.com/ I have to submit my app to apple in less than 3 hours... please assist!

    Read the article

  • Facebook Graph API and ActionScript

    - by dani
    I'm setting out to develop a number of Facebook applications/games, which make use of some Facebook user information and stores game info in a database backend etc, in ActionScript 3.0. How can one leverage the new Graph API Should I use JavaScript or PHP as a "middle layer" or should I go with the ActionScript Client Library? Are there other libraries (Facebook / database / multiplayer related.) that could simplify the development of these Facebook games?

    Read the article

  • Fetch Facebook ID with PyFacebook, "Session key is required"

    - by ensnare
    I'm trying to fetch the logged in user's ID with Facebook + PyFacebook via: #Establish connection to Facebook via API f = Facebook(config['app_conf']['pyfacebook.apikey'], config['app_conf']['pyfacebook.secret']) #Get the current Facebook ID facebook_id = f.users.getLoggedInUser() But I keep getting the error: FacebookError: Error 453: A session key is required for calling this method What am I doing wrong? Thanks.

    Read the article

  • Facebook dialogs keep popping up in Firefox

    - by Pierre Olivier Martel
    I have a facebook application running in a FBML canvas and I have a problem with dialogs (either extended permissions or stream publish dialogs). Once they popup, they keep popping up for every subsequent requests. I've tested it in Chrome and everything works fine. It seems that the URL is chained in Firefox, which gives cryptic long urls like : http://apps.facebook.com/webdweller-po/discover?_fb_q=1&_fb_qsub=apps.facebook.com#!/webdweller-dev/?_fb_q=1&_fb_qsub=apps.facebook.com Did anybody experienced such a bug?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >