Search Results

Search found 148 results on 6 pages for 'deepak prasanna'.

Page 3/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • Need Help on OAuthException Code 2500

    - by Deepak
    I am trying to develop an Facebook application (apps.facebook.com/some_app) using PHP where I need to present some information based on user's music interests. I found that its under "user_likes games". My problems are as follows: To gain access, I have implemented the oauth dialog method as suggested in API in my index page. $auth_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&redirect_uri=" . urlencode($canvas_page) ."&scope=user_likes"; After successful authorization I come back to index page with "code" as parameters. http://MY_CANVAS_PAGE/?code=some base64 encoded letters Firstly I don't know if I need access_token just to read user's music interests but I have tried all the methods suggested. I couldn't move forward from this point I have a code like this (in my index page), which redirects for authorization if code parameters is not set. if(empty($code) && !isset($_REQUEST['error'])) { $_SESSION['state'] = md5(uniqid(rand(), TRUE)); //CSRF protection echo("<script> top.location.href='" . $auth_url . "'</script>"); } Currently I am just trying to get user's public information here but with no success. I have tried the signed_request method as suggested but no success $signed_request = $_REQUEST["signed_request"]; list($encoded_sig, $payload) = explode('.', $signed_request, 2); $data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true); echo ("Welcome User: " . $data["user_id"]); Also tried the code found in http://developers.facebook.com/blog/post/500/ but I am getting error when trying to get the debug info using print_r($decoded_response); stdClass Object ( [error] => stdClass Object ( [message] => An active access token must be used to query information about the current user. [type] => OAuthException [code] => 2500 ) ) To get user's public info, I have tried also the suggested example in PHP SDK $facebook = new Facebook(array( 'appId' => MY_APP_ID, //registered facebook APP ID 'secret' => MY_SECRET, //secret key for APP )); $fb_user = $facebook->getUser(); if($fb_user){ try { $user_profile = $facebook->api('/me'); echo $user_profile['email']; } catch(FacebookApiException $e) { $fb_user = null; } } But no success. Can somebody explain me why I am getting this error and how to access the user's music interest properly. Probably I misunderstood the API. Thanks Deepak

    Read the article

  • Syntax Highlight and Autocomplete in Geany for GTK+ (C)

    - by Prasanna Choudhari
    I have just started GTK+ coding in C. I was curious whether i can get syntax highlight and auto-completion working for my GTK code... because as a beginner it would be helpful. I was completely convinced that it was not possible until i came across this video on youtube: https://www.youtube.com/watch?v=AyeQrO1VDFM&feature=plcp I asked the uploader for help, but turns out his last activity on youtube was in Septembeer :( I also tried opening the gtk.h file with geany as i had read somewhere that it worked, but unfortunately it didn't work too. Any help? :'(

    Read the article

  • Developing your Data Access Layer with ADO.NET Entity Framework 4

    Entity Framework has evolved in the light of feedback. ADO.NET Entity Framework 4 is now better able to accommodate different development methodologies. A welcome improvement is the way that, the application designer now has a range of options in the way that Entity Framework creates the Data Access layer. Prasanna returns to Simple-Talk to explain the significance of the changes.

    Read the article

  • How to create filter option in RDLC report column ?

    - by prasanna
    I wanted to have filter option (like the one available in Excel sheet) in rdlc report column. is it possible and how ? http://img62.imageshack.us/img62/2223/sample1n.png i am trying in Visual studio 2005 and Microsoft report viewer. kindly let me know the option for this or a work around for it. Thanks

    Read the article

  • jQuery, unable to store data returned by $.get function.

    - by Deepak Prasanna
    I am trying to turn div#sidebar into a sidebar in my app. My code looks like the one below. $('#sidebar').userProfile(); jQuery.fn.userProfile = function() { $.get('/users/profile', function(data){ $(this).html(data); }); }; It didnt work because, I found the this (inside the $.get function) here contexts to the get request and not $('#sidebar'). Then I tried something like below. $('#sidebar').userProfile(); #This doesnot work jQuery.fn.userProfile = function() { var side_bar = null; $.get('/users/profile', function(data){ side_bar = data; }); $(this).html(side_bar); console.log(side_bar); }; This doesnt work either. In firebug console I see Null which I am setting on top when I am declaring the variable.Atlast I made it work by changing my code to something like below by hardcoding the selector. #This works, but I cannot turn any element to a sidebar which is sick. jQuery.fn.userProfile = function() { $.get('/users/profile', function(data){ $('#sidebar').html(data); }); }; But this is not I wanted because I wanted to turn any element to a sidebar. Where am I goin wrong or which is the correct way of doing it?

    Read the article

  • My Excel template is corrupted

    - by Prasanna
    I am using an Excel template (2003) for report generation. The workbook is of 4 sheets. The original template file works fine. But when I change the template (just remove a single static char), the report is getting generated but with some junk format. When I try opening the Excel file, I get this message: The following is a list of repairs: Damage to the file was so extensive that repairs were not possible. Excel attempted to recover your formulas and values, but some data may have been lost or corrupted. Please advise.

    Read the article

  • Get the text of an li element

    - by Deepak Prasanna
    <ul class="leftbutton" > <li id="menu-selected">Sample 1</li> <li>Sample 2</li> <li>Sample 3</li> <li>Sample 4</li> <li>Sample 5</li> </ul> I want to get the text of the li item which the id="menu-selected". Right now I am doing something like document.getElementById('menu_selected').childNodes.item(0).nodeValue Is there any simpler way of doing the same?

    Read the article

  • Gvim shell problem.

    - by Deepak Prasanna
    I have been using Gvim for quite sometime and I like it very much. There is a problem I am facing with Gvim. I type "shell" and go to the command line, When I press the up arrow I get some weird symbols and I am not able to use backspace also. The version which I am using. VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Mar 19 2009 15:27:51)

    Read the article

  • How to get date format in result set?

    - by Prasanna
    I have a sql to get data form mysql their I used dateformat to convert date required format Here is the sql SELECT m.id, m.subject, m.body, m.read, m.hide, m.thread_id, DATE_FORMAT(m.sent_date, '%d-%b-%Y') sent_date, u.username to_name FROM messages m, users u WHERE u.school_id = m.school_id AND u.id = m.to_user_id AND m.school_id = 18 AND m.user_id = 53 AND m.status = 'sent' ORDER BY m.sent_date DESC When I run this sql directly in mysql it works fine, sent_date comes as (19-Apr-2010). When I excute this in ruby, in result set the sent_date is stores as (Tue Apr 20 00:00:00 UTC 2010) messages = Message.find_by_sql(sql) puts messages[0]['sent_date'] puts statement prints "Tue Apr 20 00:00:00 UTC 2010" how to get same date format in mysql result and ruby result set. Thanks

    Read the article

  • Back button title not receiving previous view controller's title

    - by Prasanna
    I am pushing 2 view controllers in to navigation stack in ApplicationDidFinishLaunching. [navigationController pushViewController:favorites animated:NO]; [navigationController pushViewController:root animated:NO]; The app loads fine, but on the start screen, the back button title is simply "Back". I do have a title for the FavoritesViewController, and a navigationItem title setup to Favorites. Am I missing something? Appreciate your help.

    Read the article

  • Calculating driving distance in iPhone

    - by Prasanna
    Hi, I need to find the driving distance between 2 locations. I do not need to display the directions in a map, just need to calculate the distance, which I need to use in my application. Does MapKit allow this? Is there an alternative that can be used? I am able to get forward geo-coding using CloudMade, but there doesn't seem to be an option to obtain driving distance. Appreciate any help.

    Read the article

  • dynamic row height

    - by Prasanna Venkatesh
    static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@""]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } //cell.backgroundView = [[[CustomCell alloc] init] autorelease]; cell.selectedBackgroundView = [[[CustomCell alloc] init] autorelease]; // At end of function, right before return cell: cell.textLabel.backgroundColor = [UIColor clearColor]; // Configure the cell. UILabel *myLabel1 = [[UILabel alloc] initWithFrame:CGRectMake(-30, 3, 300, 22)]; UILabel *myLabel2 = [[UILabel alloc] initWithFrame:CGRectMake(10, 22, 310, 200)]; UILabel *myLabel3 = [[UILabel alloc] initWithFrame:CGRectMake(0, 170, 300, 20)]; Book *aBook = [appDelegate.books objectAtIndex:indexPath.row]; myLabel1.text=aBook.title; myLabel2.text=aBook.description; myLabel3.text=aBook.pubDate; NSString *desc = aBook.description; if ([desc isEqualToString:nil]) { NSLog(@"nullll lll "); } //myLabel2.textAlignment=UITextAlignmentCenter; myLabel2.numberOfLines=5; myLabel2.textColor=[UIColor blueColor]; myLabel2.lineBreakMode=UILineBreakModeWordWrap; myLabel2.font=[UIFont systemFontOfSize:14]; myLabel3.numberOfLines=1; myLabel1.numberOfLines=1; myLabel1.textColor=[UIColor redColor]; myLabel1.font=[UIFont systemFontOfSize:20]; myLabel1.shadowColor=[UIColor redColor]; myLabel1.backgroundColor=[UIColor grayColor]; [cell.contentView addSubview:myLabel1]; [cell.contentView addSubview:myLabel2]; [cell.contentView addSubview:myLabel3]; hi guys! i have this following code, i want to display this from xml file. now its working but static row height. if the xml file dont have data then it leaves it as blank. so i want to change row height according to the data i provide using the mylabel1,2,3.text

    Read the article

  • c++ webservice having problems with Mozilla Firefox browser

    - by prasanna
    Hi , About Problem:- We have a webservice written in c++.And we use cgi scripts in HTML pages to run our own exe which will output HTML. With IE i am not seeing any problem. But With Mozilla FireFox 3.0 there is error showing up as " You have chosen to open gefebt.exe which is a : Application from http:\3.212.219.180\test Would you like to save this file" Also i did some investigation :- i have created a virtual directory using IIS where when i click hyperlink i have made gefebt.exe to execute. With IIS there is no problem untill Execute Permissions is set to "Scripts and Executables" . If i select scripts i could see the same message in IE and mozilla plugin. At the same time i not seeing any difference with the code of Webservice. The way we are reffering the executable in HTML is href=gefebt.exe?xyz.bclInvoke xyz.bcl - I have also tries with IFrames and frames .

    Read the article

  • Relative Dates with Datejs

    - by Prasanna
    I have a requirement where in, I have to parse the dates relative to a date object returned from the server side. But the datejs library always considers only the browsers date object. The situation is something like this: The server gives back the date in PST and the browser is in IST. And all the inputs are getting parsed with respect to the current date in IST instead of current date in PST. Is there any way I could resolve this. Or could you suggest any workarounds. Thanks in advance.

    Read the article

  • SQL only row mapping record fetching

    - by Prasanna
    I have a customer call detail table in which call details of all customer stored. I have to find out the distinct aparty (means our customer ) who only calls our customers (means bparty also be our numbers) . There is no other domestic call , International calls made by A party (our customer) in this case. could you people please help me to find the same data. FILE INPUT oF SAMPLE CDR TABLE ROW NAME VALUES ANUMBER :-any mobile number(Domestic+International); for our customer it must like 70,070,0070,9370) BNUMBER :-any mobile number(Domestic+International); for our customer it must like 70,070,0070,9370 CALLTRANSACTION :-eg: 91,92,93 etc CALLTRANSACTIONTYPEC :-eg: MOC,MTC FILENAME :-MCS_01 etc TIME:- any time value Required Output DISTINCT ANUMBER :-for our customer it mobile number must start with 70 or 070 or 0070 or 9370 BNUMBER :- for our customer it mobile number must start with 70 or 070 or 0070 or 9370 means our customer only calls to our network customer ( No other doestic call or international calls made by our operator)

    Read the article

  • Generate .sql files using rake task

    - by Prasanna
    Hi, I have a table called 'choices' in this table i am storing static data for my site like Blood Groups , qualification, job types etc., I have to create rake tasks one is for to create backup choices.sql file from choices table data, second one is dump the data from .sql file to choice table. How can I create the rake tasks. Any other best way to take backup data from a table and load data into the table Thanks

    Read the article

  • Escaping comma in java

    - by prasanna
    I have a string which is fed into the query as IN clause,which looks like this ('ACT','INACT') which is one of the parameters to a function inside a package.when a call is made to the function from java, it looks like this call package.function(1,2,3,('ACT','INACT'),4,5). When the package is called,i get error as wrong type of arguments. It is taking the values inside brackets as different values delimited by strings

    Read the article

  • Can we implement autoshare in facebook using xcode?

    - by Prasanna
    I am doing an iphone application in which i need to provide autoshare option to share automatically the text in an UIView in facebook when we click save button. i will save the facebook username and password of the user in datbase and retrived and want to assign for facebook and password without FBDialog... is it possible? Can anyone help me?

    Read the article

  • connecting twitter

    - by prasanna
    I am developing an iPhone application in which i need to connect with twitter. can i do this using twiter api key? If possible how to get the twitter api key?

    Read the article

  • Forward Shibboleth Environment Variables to Tomcat via Apache

    - by Deepak Singh Rawat
    I am using Shibbolethv2.3 with Apache web server and Tomcat application server. I am using Apache as a reverse proxy using mod_proxy.so. I am not able to forward the Shibboleth environment variables from Apache to Tomcat. I am able to forward the attributes in the headers but as already mentioned in the wiki this approach is not safe. I have tried forwarding the environment variables by the following directive : SetEnv AJP_username ${username} then at the Java side I can access the attribute by : request.getAttribute("username"); The strange thing here is that, I get a different value instead of the one set by Shibboleth. I get the Windows account name as a result. If I use any other attribute name, I get a null value. I have searched a lot and have run out of options. Please guide me towards the right solution. My setup details : Shibboleth version : 2.3 OS : Windows XP SP3 Webserver : Apache 2.2 Application Server : Tomcat 6 Proxy module : mod_proxy.so

    Read the article

  • RTL8168B/8111B Lan card is not detected in Redhat..Error is make ***/lib/modules/2.6.18-53.e15/build

    - by Deepak Narwal
    0 Hello friends... In My computer Lan card model is Realtek RTL8168B/8111B PCI-E GIGABIT ETHERNET NIC (NDIS 6.20) My system is dual boot windows 7 and redhat 5.1.Redhat is not picking up this model of Lan card automaticlly. I tried it by downloading from realtak site for this particular model and find some .tar packages for my kernal and when i tried to install them ... check old drivers & unload it build the module and install make */lib/modules/2.6.18-53.e15/build: no such file or directory stop make[1]: *[modules] error 2 make : [modules] error 2 i downloaded tar files from sites and unpack according to their instrution i tried to run autorun.sh script as mentioned in readme file but after doing this it is showing above error... Now what to do i am not getting

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >