Search Results

Search found 11296 results on 452 pages for 'facebook sdk 3 0'.

Page 57/452 | < Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >

  • call FB.login() after FB.init() automatically

    - by Tobi Projectx
    i`m developing an app for Facebook. My Code: function init() { window.fbAsyncInit = function() { var appID = 'xxxxxxxxxxxxxxxxxxxxxxxxxx'; FB.init({ appId: appID, status: true, cookie: true, xfbml: true}); login(); }; (function() { var e = document.createElement("script"); e.async = true; e.src = "https://connect.facebook.net/en_US/all.js?xfbml=1"; document.getElementById("fb-root").appendChild(e); }()); }; function login() { FB.login(function(response) { if (response.session) { if (response.perms) { // user is logged in and granted some permissions. // perms is a comma separated list of granted permissions } else { // user is logged in, but did not grant any permissions } } else { // user is not logged in } }, {perms:'read_stream,publish_stream,offline_access'}); }; I want to call the "init" function and after "init" should call the "login" function (open up the Facebook Login Window) automatically. But i always get "b is null" FB.provide('',{ui:function(f,b){if(!f....onent(FB.UIServer._resultToken));}}); Error in Firebug. Can anybody help me? Does anybody have the same problem? Thanks

    Read the article

  • Ksoap2 Error after Updating Android SDK and ADT

    - by user1291644
    I have a problem. When I updated Android SDK tool to version 17 and the ADT to 17 I can't use ksoap2 any more. I start the app and get this error: 03-25 20:13:49.995: E/AndroidRuntime(555): FATAL EXCEPTION: main 03-25 20:13:49.995: E/AndroidRuntime(555): java.lang.NoClassDefFoundError: org.ksoap2.serialization.SoapObject 03-25 20:13:49.995: E/AndroidRuntime(555): at com.alcad.pernat.praksa.SplashScreen.pridobiDanasnjo(SplashScreen.java:124) 03-25 20:13:49.995: E/AndroidRuntime(555): at com.alcad.pernat.praksa.SplashScreen.onCreate(SplashScreen.java:73) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.os.Handler.dispatchMessage(Handler.java:99) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.os.Looper.loop(Looper.java:123) 03-25 20:13:49.995: E/AndroidRuntime(555): at android.app.ActivityThread.main(ActivityThread.java:4627) 03-25 20:13:49.995: E/AndroidRuntime(555): at java.lang.reflect.Method.invokeNative(Native Method) 03-25 20:13:49.995: E/AndroidRuntime(555): at java.lang.reflect.Method.invoke(Method.java:521) 03-25 20:13:49.995: E/AndroidRuntime(555): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 03-25 20:13:49.995: E/AndroidRuntime(555): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 03-25 20:13:49.995: E/AndroidRuntime(555): at dalvik.system.NativeStart.main(Native Method) I should get String with some numbers but instead I get this error. I was using ksoap2-2.5.4.jar and tried the new ksoap2-android-assembly-2.6.2-jar-with-dependencies.jar. I'm using Eclipse indigo, Ubuntu 11.04. The code looks like this: SoapObject Request =new SoapObject(NAMESPACE,METHOD_NAME); // Here I get the error SoapSerializationEnvelope soapEnvelope=new SoapSerializationEnvelope(SoapEnvelope.VER11); soapEnvelope.dotNet=false; String tmp=odstejDatum(datum); Request.addProperty("datumod",tmp); Request.addProperty("datumdo",datum); Request.addProperty("tip_lme",1); @SuppressWarnings("deprecation") HttpTransportSE aht=new HttpTransportSE(URL,5000); soapEnvelope.setOutputSoapObject(Request); // aht.call(SOAP_ACTION_DANASNJI,soapEnvelope); Object response= soapEnvelope.getResponse(); Thanks for the help.

    Read the article

  • facebook app using fbml displays nothing

    - by fusion
    i've made an app in php and html and trying to integrate it with fb. the app on my website is using jquery, but knowing that fbml doesn't support jquery, i've tried to instead use fbjqry. this doesn't work either. i'm not sure where i'm going wrong. /////////////// index.php: <?php // Copyright 2007 Facebook Corp. All Rights Reserved. require_once 'config_fb.php'; //***** Greet the currently logged-in user! echo "<p>Hello, <fb:name uid=\"$user_id\" useyou=\"false\" />!</p>"; include 'quote.html'; ?> ///////////////// quote.html: <!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" type="text/css" href="css/jquote.css" /> <!--<script type="text/javascript" src="scripts/jquery-1.4.2.js"></script>--> <script type="text/javascript" src="fbjqry/utility.js"></script> <script type="text/javascript" src="fbjqry/fjqry.js"></script> <script type="text/javascript"> // On page load, fill the box with content. $(document).ready(function() { $("#quoteContainer").load("quote.php"); }); var auto_refresh = setInterval( function () { $('#quoteContainer').load('quote.php'); }, 5000); // refresh every 10000 milliseconds </script> </head> <div id="wrapper"> <div class="header">&nbsp;Quote of the Day</div> <div id="quoteContainer"> </div> </div> </html> //// from the above file it should take quotes from quote.php and display it, but it doesn't display anything. it seems as though it isn't reading from the quote.php file. is the command of fbjqry different from jquery? if i use iframes instead of fbml, everything loads correctly except that i'd like tab/profile box for this app, which iframes doesn't have.

    Read the article

  • AWS .NET SDK v2: the message-pump pattern

    - by Elton Stoneman
    Originally posted on: http://geekswithblogs.net/EltonStoneman/archive/2013/10/11/aws-.net-sdk-v2--the-message-pump-pattern.aspxVersion 2 of the AWS SDK for .NET has had a few pre-release iterations on NuGet and is stable, if a bit lacking in step-by-step guides. There’s at least one big reason to try it out: the SQS queue client now supports asynchronous reads, so you don’t need a clumsy polling mechanism to retrieve messages. The new approach  is easy to use, and lets you work with AWS queues in a similar way to the message-pump pattern used in the latest Azure SDK for Service Bus queues and topics. I’ve posted a simple wrapper class for subscribing to an SQS hub on gist here: A wrapper for the SQS client in the AWS SDK for.NET v2, which uses the message-pump pattern. Here’s the core functionality in the subscribe method: private async void Subscribe() { if (_isListening) { var request = new ReceiveMessageRequest { MaxNumberOfMessages = 10 }; request.QueueUrl = QueueUrl; var result = await _sqsClient.ReceiveMessageAsync(request, _cancellationTokenSource.Token); if (result.Messages.Count > 0) { foreach (var message in result.Messages) { if (_receiveAction != null && message != null) { _receiveAction(message.Body); DeleteMessage(message.ReceiptHandle); } } } } if (_isListening) { Subscribe(); } } which you call with something like this: client.Subscribe(x=>Log.Debug(x.Body)); The async SDK call returns when there is something in the queue, and will run your receive action for every message it gets in the batch (defaults to the maximum size of 10 messages per call). The listener will sit there awaiting messages until you stop it with: client.Unsubscribe(); Internally it has a cancellation token which it sets when you call unsubscribe, which cancels any in-flight call to SQS and stops the pump. The wrapper will also create the queue if it doesn’t exist at runtime. The Ensure() method gets called in the constructor so when you first use the client for a queue (sending or subscribing), it will set itself up: if (!Exists()) { var request = new CreateQueueRequest(); request.QueueName = QueueName; var response = _sqsClient.CreateQueue(request); QueueUrl = response.QueueUrl; } The Exists() check has to do make a call to ListQueues on the SNS client, as it doesn’t provide its own method to check if a queue exists. That call also populates the Amazon Resource Name, the unique identifier for this queue, which will be useful later. To use the wrapper, just instantiate and go: var queueClient = new QueueClient(“ProcessWorkflow”); queueClient.Subscribe(x=>Log.Debug(x.Body)); var message = {}; //etc. queueClient.Send(message);

    Read the article

  • URL routing similar to Facebook (related to AJAX and the URL)

    - by Guilherme Cardoso
    In this article i'm gonna show you how i do when i have to update some content with AJAX and i have to change the URL. First, let's see an example to understand it better. If the user is reading a News with Id 1 and he clicked on another News with Id 2, if we update the content with AJAX the user is now reading the News Id 2 but the URL remains the same, for example: http://localhost/News/Read/1 Now let's see another example from Facebook. If i'm reading my profile and i click on Photos, Facebook updates it with AJAX and the URL switch to: http://www.facebook.com/guilhermegeek#!/guilhermegeek?sk=photos If we enter on that URL, it's mapped to: http://www.facebook.com/guilhermegeek?sk=photos The trick here is the parameters that we use after the #!. Those parameters are never sent to the server side, so we handle them on the client side (javascript).In the example of Facebook, he receives my profile name (guilhermegeek) and the action is to read photos. A few time ago i've written an article in my Portuguese blog explaining how to use an alternative to clients with javascript disabled. Like this: <a onclick="javascript:ReadNews(id);" href="#!News/Read/@id/">Title</a> When the user enter the link of that news, my function Read(); fills the News in the page. Then, i add the #!News/Read/@id/ to my URL. It's gonna stay something like this: http://localhost/News/Read/1#!News/Read/2 As i explained before, the News that the user is reading has the Id 2.The next step is to use javascript to check if the URL that the user typed has other News Id, because if we enter on the above URL our controller will get the Id 1 (everything after to the # isn't sent to the server side). $(document).ready(function () {             var h = window.location.hash;             if (h != null) {                 var parts = window.location.href.split('#!');                 if (parts.length > 1) {                     window.location.replace("http://localhost/" + parts[1]);                 }             }    }); It's pretty simple. I'm cutting everything after the #!, then i redirect the user to a new page. So, it's gonna stay:http://localhost/News/Read/2

    Read the article

  • Watch 53rd Grammy Awards 2011 Live Stream & Follow The Event On Facebook & Twitter

    - by Gopinath
    Grammy Awards is the biggest music awards ceremony that honours music genres. The 53rd Grammy Awards function will be held on February 13, 2011 at Staples Center in Los Angeles. The star studded musical event will be telecasted live on CBS TV between 8pm ET until 11:30pm ET. Behind The Scenes Live Stream On YouTube and Grammy.com Grammy, YouTube and TurboTax has teamed up to provide live stream of behind the scene coverage of key events starting at 5pm Feb 11th and runs through February 13th. Note that this stream will not broadcast the 3 hour long award presentation. Kind of bad, except the award presentation rest of the ceremony is streamed here.  The video stream is embedded below Catch live behind-the-scenes coverage of key events during GRAMMY week. Before the show, you can watch the Nominees Reception, Clive Davis Pre-GRAMMY Gala, the red carpet and the pre-telecast ceremony. During the show, go backstage to see the winners after they accept their award! You can catch the same stream on Grammys’s YouTube channel as well as on Grammy.com website Follow Grammy Awards On Facebook & Twitter The Grammy Awards has an official Facebook and Twitter account and you can follow them for all the latest information The Grammy’s Facebook Page The Grammy’s Twitter Page Grammy Live Streaming on UStream & Justin.tv Even though there is no official source that stream live of The Grammy Awards presentation ceremony, there will be plenty of unofficial sources on UStream and Justin.tv. So search UStream and Justin.tv for live streaming of The Grammy’s. TV Channels Telecasting The Grammy Awards 2011 Here is the list of TV channels in various countries offering live telecast of The Grammy Awards 2011. We keep updating this section as and when we get more information USA – CBS Television Network  – February 13, 2011 India – VH1 TV – February 14  2011 , 6:30 AM United Kingdom – ITV2  – 16 February 2011, 10:00PM – 12:00AM This article titled,Watch 53rd Grammy Awards 2011 Live Stream & Follow The Event On Facebook & Twitter, was originally published at Tech Dreams. Grab our rss feed or fan us on Facebook to get updates from us.

    Read the article

  • How to set up RPX widget and facebook app to be able to authenticate with rpx_now?

    - by Andrei
    Using the sample app for rpx_now gem ( http://github.com/grosser/rpx_now_example) on localhost:3000, I have successfully logged in via Google Accounts, myOpenID, Yahoo, but cannot make it via Facebook. In the RPX app/widget settings I have set my facebook-app key and secret. In my facebook app settings, the Connect URL is myappname.rpxnow.com. But when I try to connect, then I don't even see a facebook login page, just a number of redirects and I am back to my localhost with the following exception http://gist.github.com/386520 . Before I was successfully connecting with oauth2 gem, however, without fetching user data - only authentication. That time I set only key/secret and localhost as my Connect URL. Currently, I don't even ask for email etc., but still the same problem. Can it happen because rpx_now cannot get requested user data from facebook? Or it is a problem of facebook key/secret? May be I need to provide more settings of my facebook app? RPXNow::ApiError in UsersController#create Got error: Invalid parameter: token (code: 1), HTTP status: 200 RAILS_ROOT: /home/Andrei/rpx_now_example Application Trace | Framework Trace | Full Trace /usr/lib/ruby/gems/1.8/gems/rpx_now-0.6.20/lib/rpx_now/api.rb:71:in `parse_response' /usr/lib/ruby/gems/1.8/gems/rpx_now-0.6.20/lib/rpx_now/api.rb:21:in `call' /usr/lib/ruby/gems/1.8/gems/rpx_now-0.6.20/lib/rpx_now.rb:23:in `user_data' /home/Andrei/rpx_now_example/app/controllers/users_controller.rb:16:in `create' Request Parameters: None Show session dump Response Headers: {"Content-Type"="", "Cache-Control"="no-cache"}

    Read the article

  • Android:Where is exactly Android 1.6 SDK download?

    - by user187532
    Hello friends, I want install Android version 1.6 SDK. I already have Android development setup with Eclipse and Android 1.5 SDK. Wherever i search in Google to download Android 1.6 SDK, it finally goes to link: http://developer.android.com/intl/zh-CN/sdk/index.html This link has three setup SDK zip files, but no where mentioned what version of SDK setup are those? Why such confusions in this Android website for showing just version of SDK setup files? Where i can get exactly Android 1.6 SDK setup download? Could someone point out me clearly? Is there any special steps that i need to follow to overwrite 1.6 SDK with my existing setup environment? Thank you.

    Read the article

  • VC++ 6 and MS Speech SDK 5.1 fatal error C1083: Cannot open source file: 'files\microsoft': No such

    - by eg123
    Trying to compile an application (flite synthesis sapi) on vc++6. This requires Microsoft Speech SDK 5.1 Have included C:\Program Files\Microsoft Speech SDK 5.1\IDL C:\Program Files\Microsoft Speech SDK 5.1\include using Toolsoptionsdirectories and also on another attempt via ProjectSettings Repeatedly get this error microsoft fatal error C1083: Cannot open source file: 'files\microsoft': No such file or directory speech fatal error C1083: Cannot open source file: 'speech': No such file or directory sdk fatal error C1083: Cannot open source file: 'sdk': No such file or directory idl fatal error C1083: Cannot open source file: '5.1\idl': No such file or directory FliteCMUKalDiphone.idl Thought it may be spaces related so included full path in quotes in relevant .h files. No joy Installed Microsoft Speech SDK 5.1 on another machine in same folder as flite and renamed to mssdk51 (so no spaces in pathname) but same error came up. Tried pasting in contents of each .idl called in file where glitch seems to generate Still same message. I am new to C++ and programming in general. My only guess is that something in the speech sdk is calling the .idl file and I can't find where from. Of course this is probably way wrong!

    Read the article

  • How to implement Facebook leaderboard game for mobile?

    - by TrueGrime
    I am in the final stages of developing an indie C# mobile game that I will deploy to iPhones and Androids using Mono. I wish to add push notifications and a Facebook leader board feature into the game, such that the user will be presented with a list of all his/her friends that are playing the game and their weekly scores in the main screen. I have ZERO experience with web development/networking/databases. I recently started researching the field and formed a basic understanding. Facebook has SDKs in PHP, JavaScript, obj-c and java, tho reading the documentation examples still feels cryptic to me since it involves web/server tech. After researching some more, I understood that my options for server side are basically PHP or ASP.Net. It seems that ASP.Net is more favorable in my case since I am already proficient with C# (but there is no ASP.net SDK from Facebook... I am not sure if this implies that I cant interact with Facebook using ASP.Net). On the down side some have mentioned higher costs for ASP.Net, tho I havent looked further into that aspect yet. I also understood that JavaScript is client side technology. I started going through tutorials of ASP.Net, I was thinking that ASP.Net is a purely server side management language, but it started feeling more like WPF as those tutorials started getting into very lengthy discussions about creating website interfaces and styles. I am not interested in that, I just want to have a web server which my app can somehow communicate with and get friends/scores. Am I learning the right technologies for my goal? should I be learning something else? I am posting this in hopes that someone who knows this field well can see through my problem and help guide me, otherwise I could spend months studying something that might not be the right solution to my goal. Thanks.

    Read the article

  • The tale of how the PowerShell CmdLets got installed with Azure SDK 1.4

    - by Enrique Lima
    I installed the Azure SDK 1.4 while rebuilding my laptop and ran the installation for the Windows Azure Service Management PowerShell CmdLets. Kicked off the installation script for the WASM PowerShell CmdLets by locating the path to which WASM PowerShell CmdLets was deployed to. Double clicked the startHere command. It will then open the WASM installation dialog. Click Next. Click Next. Notice the red x next to the Azure SDK 1.3, the problem is I have SDK 1.4 Here is the workaround, I go back to the location of the deployed WASM sources. Go into the setup path, then scripts>dependencies>check. Now, locate the CheckAzureSDK.ps1 file, and right-click, then edit. This is the content in the ps1 file, it check for the specific version of the Azure SDK, in this case, it is looking for version 1.3.11133.0038. We need for it to check for version 1.4.20227.1419 Now, save your ps1 file, go back to the open WASM install dialog, and click rescan. This time it should pass, then click next. A Command prompt window will appear, click any key. This completes the installation, click Close.

    Read the article

  • install android sdk on kubuntu

    - by dot
    I'm trying to follow the instructions for installing the android sdk found here: http://developer.android.com/sdk/installing/adding-packages.html After i've unpackaged and i run the android program under tools, I don't get all the options that I'm supposed to. The only 2 folders that show up are tools, and extras. Under tools, it only shows the "Android SDK Tools" with the status "Installed". Under the "extas" folder, I have nothing. I've made sure that my http: proxy settings are correct. And I've checked the logs. there are no errors. According to the android developer site, I'm supposed to install the SDK platform tools. has anyone tried this on ubuntu? I also checked and saw others were instructed to do an apt-get install ia32-libs but it failed for me. Besides which, I am running the 32bit os... so I don't think i would need to install that... ?? I've also tried following the instructions found here: http://forums.team-nocturnal.com/showthread.php/772 But... I can't seem to add the personal archive nilarimogard without getting an error message. when i attempt: sudo add-apt-repository ppa:nilarimogard/webupd8 I get the message: Traceback (most recent call last): File "/usr/bin/add-apt-repository", line 125, in ppa_info = get_ppa_info_from_lp(user, ppa_name) File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 80, in get_ppa_info_from_lp curl.perform() pycurl.error: (7, "couldn't connect to host") root@jll:/home/me/Documents# any suggestions? Thanks.

    Read the article

  • Embedding Youtube Videos on user's wall with the Javascript API

    - by dragonmantank
    I'm attempting to embed a Youtube video on a user's wall using the Javascript API. I've poured over a bunch of different tutorials and came up with this: var data = { method: 'feed', link: current_video_url, // Link to the vide on our site source: current_video_src, // Link to the Youtube video, http://youtube.com/v/[hash] picture: current_picture_url, // Thumbnail from youtube title: current_video_title, // Title from our page caption: current_video_description // Text from our page } FB.ui(data); Running the Facebook Debugger shows that the current_video_url link is being properly parsed for OG tags and is available as an embedded video. I ran a debugger and all the variables are being properly set in the data variable. This worked fine for about 2 days, and then we pushed the site live. We set up a new AppID in Facebook but now all the videos are just thumbnails instead of being embedded in the user's wall. I thought maybe this is a problem with the live site but now the dev site is broken too. What's the best way to get this to work consistently?

    Read the article

  • Webview can't type in, is that because of missing setting?

    - by Pentium10
    I have an Android application that connects to Facebook to request authorization of an Application. I use the following setting in the WebView, but once the view is loaded, I can't type in login details. What I am missing? WebView webview; webview = (WebView) findViewById(R.id.facebookview); webview.getSettings().setJavaScriptEnabled(true); webview.setWebViewClient(new FacebookWebViewClient()); webview .loadUrl("http://www.connect.facebook.com/login.php?return_session=1&nochrome=1&fbconnect=1&extern=2&connect_display=popup&api_key=" + FConnect.API_KEY + "&v=1.0&next=" + FConnect.SUCCESS_URL + "%3Ffb_login%26fname%3D_opener&cancel_url=" + FConnect.CANCEL_URL + "%23fname%3D_opener%26%257B%2522t%2522%253A3%252C%2522h%2522%253A%2522fbCancelLogin%2522%252C%2522sid%2522%253A%25220.741%2522%257D&channel_url=" + FConnect.XD_RECEIVER);

    Read the article

  • Get the ID of user that like my page.

    - by jon
    Hello I would like to know if there is any API feature that can tell me which users liked my application page. I know that it is possible to check if a user is a fan of any given Page using page.isFan verification or to get the number of fans. But is it possible to get the fans' User ID? If so, is it possible to get that data ordered by the date they became fans of the page? For exemple usign FQL i can get the user ID of someone o like an facebook object like post or photo. http://developers.facebook.com/docs/reference/fql/like Can i do this for the people who liked my page? Thanks for any help or guideline .

    Read the article

  • Uploading a picture to a album using the graph api

    - by kielie
    Hi guys, I am trying to upload an image to a album, but it's not working, here is the code I am using, $uid = $facebook->getUser(); $args = array('message' => $uid); $file_path = "http://www.site.com/path/to/file.jpg"; $album_id = '1234'; $args['name'] = '@' . realpath($file_path); $data = $facebook->api('/'. $album_id . '/photos', 'post', $args); print_r($data); This code is in a function.php file that gets called when a user clicks on a button inside of a flash file that is embedded on my canvas, so basically what I want it to do is, when the flash takes a screen shot and passes the variable "image" to the function, it should upload $_GET['image'] to the album. How could I go about doing this? Thanx in advance!

    Read the article

  • css file not getting updated

    - by fusion
    the font of the content of my facebook app keeps getting italicized even when i've removed the italics from the css file. if i make minor changes in the css file and upload it to the server, the firebug shows the unedited previous css file and hence, the app keeps showing unformatted content. what exactly is going wrong here? i made a new css file and copied the contents of the previous css exactly as it was, and i linked it in all the files which require css. but when i upload these files to the server, facebook canvas doesn't show any css at all. i replaced the css filename with the previous one, and it works. why is this?

    Read the article

  • Confusion with cookie session token and oauth2.0 don't know where to go anymore

    - by byte_slave
    Hi guys, I'm completely confused, frustrated and nothing seems to make sense and work any more. I' dev some iframe fb app and i've been using the javascript sdk (FB.Init()) to get the access_token, but doesn't always work, sometimes i'm already logged into FB and doesn't works... Did some reading, and read also that there is problems using cookies in iframes in Opera and IE, so I was thinking in use the OAuth 2.0 but i'm not sure how via facebook sdk c# and now I'm now completely lost, don't know if i still need to use the javascript FB.Init(). Documentation out there is poor and unclear, a lot of stuff refers to old code, and after hours of reading, jumping on examples, i'm completely messed up and confused. Can some, please, point/explain/enlightening me about this? Thanks a lot guys, appreciated! Merry christmas!

    Read the article

  • Can you call FB.login inside a callback from other FB methods (like FB.getLoginStatus) without triggering popup blockers?

    - by Erik Kallevig
    I'm trying to set up a pretty basic authentication logic flow with the FB JavaScript SDK to check a user's logged-in status and permissions before performing an action (and prompting the user to login with permissions if they are not)... User types a message into a textarea on my site to post to their Facebook feed and click's a 'post to facebook' button on my site. In response to the click, I check user's logged in status with FB.getLoginStatus In the callback to FB.getLoginStatus, if user is not logged in, prompt them to login (FB.login). In the callback to FB.login I then need to make sure they have the right permissions so I make a call to FB.api('/me/permissions') -- if they don't , I again prompt them to login (FB.login) The problem I'm running into is that anytime I try to call FB.login inside a callback to other FB methods, the browser seems to lose track of the origin of execution (the click) and thus will block the popup. I'm wondering if I'm missing some way to prompt the user to login after checking their status without the browser mistakenly thinking that it's not a user-initiated popup? I've currently fallen back to just calling FB.login() first regardless. The undesired side effect of this approach, however, is that if the user is already logged-in with permissions and I'm still calling FB.login, the auth popup will open and close immediately before continuing, which looks rather buggy despite being functional. It seems like checking a user's login status and permissions before doing something would be a common flow so I feel like I'm missing something. Here's some example code. <div onclick="onClickPostBtn()">Post to Facebook</div> <script> // Callback to click on Post button. function onClickPostBtn() { // Check if logged in, prompt to do so if not. FB.getLoginStatus(function(response) { if (response.status === 'connected') { checkPermissions(response.authResponse.accessToken); } else { FB.login(function(){}, {scope: 'publish_stream'}) } }); } // Logged in, check permissions. function checkPermissions(accessToken) { FB.api('/me/permissions', {'access_token': accessToken}, function(response){ // Logged in and authorized for this site. if (response.data && response.data.length) { // Parse response object to check for permission here... if (hasPermission) { // Logged in with permission, perform some action. } else { // Logged in without proper permission, request login with permissions. FB.login(function(){}, {scope: 'publish_stream'}) } // Logged in to FB but not authorized for this site. } else { FB.login(function(){}, {scope: 'publish_stream'}) } } ); } </script>

    Read the article

  • How do I change the name of an application tab?

    - by Tom Rom
    I'm working on a facebook page for a client and with the new profiles pages starting to roll out I've come across an issue with the name of the app I created. The original profiles which most of you will see here - http://www.facebook.com/DrMartyBecker says "Welcome" as the tab name. On the new profile pages the tab says 'drMARTY', I can't find the place where I can modify the name. So i was wondering if there was a way to change this and where. Thanks for the help!

    Read the article

  • echoing our parts of an Array?

    - by Wes
    I have the following array that I get as an output from facebook: http://www.paste.to/v/1jntlnml With the following code: $stream = $facebook->api_client->stream_get('',128342905144,'0','0',30,'','','',''); foreach($stream as $wallpost) { echo '<pre>'; print_r($wallpost); echo '</pre>'; } So I get the data that I need, but I want to call the individual variables within this array. For example, echo out the [message] for each post. Since it only loops once, I cant echo $wallpost['message'] or anything similar. any idea?

    Read the article

  • Now Available &ndash; Windows Azure SDK 1.6

    - by Shaun
    Microsoft has just announced the Windows Azure SDK 1.6 and the Windows Azure Tools for Visual Studio 1.6. Now people can download the latest product through the WebPI. After you downloaded and installed the SDK you will find that The SDK 1.6 can be stayed side by side with the SDK 1.5, which means you can still using the 1.5 assemblies. But the Visual Studio Tools would be upgraded to 1.6. Different from the previous SDK, in this version it includes 4 components: Windows Azure Authoring Tools, Windows Azure Emulators, Windows Azure Libraries for .NET 1.6 and the Windows Azure Tools for Microsoft Visual Studio 2010. There are some significant upgrades in this version, which are Publishing Enhancement: More easily connect to the Windows Azure when publish your application by retrieving a publish setting file. It will let you configure some settings of the deployment, without getting back to the developer portal. Multi-profiles: The publish settings, cloud configuration files, etc. will be stored in one or more MSBuild files. It will be much easier to switch the settings between vary build environments. MSBuild Command-line Build Support. In-Place Upgrade Support.   Publishing Enhancement So let’s have a look about the new features of the publishing. Just create a new Windows Azure project in Visual Studio 2010 with a MVC 3 Web Role, and right-click the Windows Azure project node in the solution explorer, then select Publish, we will find the new publish dialog. In this version the first thing we need to do is to connect to our Windows Azure subscription. Click the “Sign in to download credentials” link, we will be navigated to the login page to provide the Live ID. The Windows Azure Tool will generate a certificate file and uploaded to the subscriptions those belong to us. Then we will download a PUBLISHSETTINGS file, which contains the credentials and subscriptions information. The Visual Studio Tool will generate a certificate and deployed to the subscriptions you have as the Management Certificate. The VS Tool will use this certificate to connect to the subscription in the next step. In the next step, I would back to the Visual Studio (the publish dialog should be stilling opened) and click the Import button, select the PUBLISHSETTINGS file I had just downloaded. Then all my subscriptions will be shown in the dropdown list. Select a subscription that I want the application to be published and press the Next button, then we can select the hosted service, environment, build configuration and service configuration shown in the dialog. In this version we can create a new hosted service directly here rather than go back to the developer portal. Just select the <Create New …> item in the hosted service. What we need to do is to provide the hosted service name and the location. Once clicked the OK, after several seconds the hosted service will be established. If we went to the developer portal we will find the new hosted service in my subscription. a) Currently we cannot select the Affinity Group when create a new hosted service through the Visual Studio Publish dialog. b) Although we can specify the hosted service name and DNS prefixing through the developer portal, we cannot do so from the VS Tool, which means the DNS prefixing would be the same as what we specified for the hosted service name. For example, we specified our hosted service name as “Sdk16Demo”, so the public URL would be http://sdk16demo.cloudapp.net/. After created a new hosted service we can select the cloud environment (production or staging), the build configuration (release or debug), and the service configuration (cloud or local). And we can set the Remote Desktop by check the related checkbox as well. One thing should be note is that, in this version when we set the Remote Desktop settings we don’t need to specify a certificate by default. This is because the Visual Studio will generate a new certificate for us by default. But we can still specify an existing certificate for RDC, by clicking the “More Options” button. Visual Studio Tool will create another certificate for the Remote Desktop connection. It will NOT use the certificate that managing the subscription. We also can select the “Advanced Settings” page to specify the deployment label, storage account, IntelliTrace and .NET profiling information, etc.. Press Next button, the dialog will display all settings I had just specified and it will save them as a new profile. The last step is to click the Publish button. Since we enabled the Remote Desktop feature, the first step of publishing was uploading the certificate. And then it will verify the storage account we specified and upload the package, then finally created the website in Windows Azure.   Multi-Profiles After published, if we back to the Visual Studio we can find a AZUREPUBXML file under the Profiles folder in the Azure project. It includes all settings we specified before. If we publish this project again, we can just use the current settings (hosted service, environment, RDC, etc.) from this profile without input them again. And this is very useful when we have more than one deployment settings. For example it would be able to have one AZUREPUBXML profile for deploying to testing environment (debug building, less roles with RDC and IntelliTrace) and one for production (release building, more roles but without IntelliTrace).   In-Place Upgrade Support Let’s change some codes in the MVC pages and click the Publish menu from the azure project node. No need to specify any settings,  here we can use the pervious settings by loading the azure profile file (AZUREPUBXML). After clicked the Publish button the VS Tool brought a dialog to us to indicate that there’s a deployment available in the hosted service environment, and prompt to REPLACE it or not. Notice that in this version, the dialog tool said “replace” rather than “delete”, which means by default the VS Tool will use In-Place Upgrade when we deploy to a hosted service that has a deployment already exist. After click Yes the VS Tool will upload the package and perform the In-Place Upgrade. If we back to the developer portal we can find that the status of the hosted service was turned to “Updating…”. But in the previous SDK, it will try to delete the whole deployment and publish a new one.   Summary When the Microsoft announced the features that allows the changing VM size via In-Place Upgrade, they also mentioned that in the next few versions the user experience of publishing the azure application would be improved. The target was trying to accomplish the whole publish experience in Visual Studio, which means no need to touch developer portal any more. In the SDK 1.6 we can see from the new publish dialog, as a developer we can do the whole process, includes creating hosted service, specifying the environment, configuration, remote desktop, etc. values without going back the the developer portal.   Hope this helps, Shaun All documents and related graphics, codes are provided "AS IS" without warranty of any kind. Copyright © Shaun Ziyan Xu. This work is licensed under the Creative Commons License.

    Read the article

  • Why would a FaceBook application "work" on a profile, but not a page?

    - by edt
    I made a FaceBook application that works fine on profiles, but I can't figure out how to get it to show on a FaceBook page. For example, after I visit the application canvas URL, allow the application, then edit application settings and "add" to box and tab view... I cannot click the "plus" symbol to the left of the tabs in order to add a tab for the application. It does not appear in the list of available applications. Meanwhile, the application is working/showing up on profiles with no issues. I DID check the "Installable to Pages" checkbox on the application (authentication tab) settings. What could cause this? Here is the application canvas URL: http://apps.facebook.com/russian_girls/

    Read the article

  • How can I get the Android SDK working with Eclipse in Ubuntu 9.10 64-bit?

    - by user30667
    I would like to tinker with the Android software development kit, and I have found out that it only support 32-bit versions of the Java Platform and Eclipse. I installed the ia32 Sun Java runtime environment and the 32-bit version of Eclipse. I also used the update-alternatives program to make a java 32-bit preference. Both of these seem to run fine. I also installed the Eclipse android plugins, but my problem lies in the SDK downloaded from Google. When I go to Eclipse preferences and try to tell it about my Android SDK location, there are no SDK targets listed. Has anyone else gotten this running on Ubuntu 9.10 64-bit? Thanks.

    Read the article

  • Compiling program that uses libpcap on Mac OSX using iPhone 3.1.1 SDK for use on iPhone

    - by Alan
    Hey SOV users, I have a question that I'm hoping some iPhone Developers may be able to help with. I had a look at statically compiling a binary on my Mac and moving it over to the iPhone for execution. I have managed to get this bit of it working by installing the iPhone 3.1.3 SDK on my Mac and setting the architecture to the iPhone in the gcc line as follows; /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -I ~/Downloads/libpcap-1.1.1/pcap-compiled/ -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk -o test test.c I have managed to successfully compile a "Hello World" C program and executed it on the iPhone with success. e.g. include int main() { printf("Hello, World!\n"); return(0); } This worked a charm. I am also using 'ldid' to sign the application (but only if necessary). Anyways, I have been trying to get a program to compile which uses libpcap (http://www.tcpdump.org/) but with little success. I have downloaded and installed libpcap-1.1.1 on my mac and set the configure --prefix to /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk/usr/local and build the application. I then saw that the includes actually reside in Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk/usr/includes and so moved the Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk/usr/local/include files (which contained only the pcap stuff) to the correct location. I then attempted to compile the test program using; /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -I /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.3.sdk/usr/include/ -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk -o pcap pcap.c -lpcap This worked a lot better than other tests but produces an error; i.e. ld: library not found for -lcrt1.o collect2: ld returned 1 exit status Do you have any ideas as to how I can do this successfully? I've tried a load of different things but none seem to be successful. Basically, I just want to install (or add) some headers to the existing iPhoneOS SDK for use in compiling programs. Any ideas? Cheers, A

    Read the article

< Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >