Search Results

Search found 14829 results on 594 pages for 'sharepoint api'.

Page 81/594 | < Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >

  • how to get all group images in facebook using FACEBOOK API

    - by From.ME.to.YOU
    Hello i'm trying to get all the images from a facebook group using facebook API i have a problem i can't get all the photos using $facebook->api_client->call_method('Photos.get', array('subj_id' => $uid)); http://wiki.developers.facebook.com/index.php/Photos.get what i'm using now is the method $albums = $facebook->api_client->photos_getAlbums($uid, NULL); http://wiki.developers.facebook.com/index.php/Photos.getAlbums and then loop for ever album on $facebook->api_client->call_method('Photos.get', array('subj_id' => $uid)); then i add every new array results to my big array $big_array = array_merge($big_array,$result_array_from_that_call); 2 problems occurs here : 1- sometimes this calls fails - i think because of too many calls per second - 2- the request takes a v.long time to process is there a better way to do that? Thanks guys Cheers EDIT :: i tried to get all the images using $facebook->api_client->call_method('Photos.get', array('subj_id' => $uid)); and using $uid as the group ID but that's doesn't work " don't know why maybe because all the images is listed in groups "

    Read the article

  • Youtube API - How to limit results for pagination?

    - by worchyld
    I want to grab a user's uploads (ie: BBC) and limit the output to 10 per page. Whilst I can use the following URL: http://gdata.youtube.com/feeds/api/users/bbc/uploads/?start-index=1&max-results=10 The above works okay. I want to use the query method instead: The Zend Framework docs: http://framework.zend.com/manual/en/zend.gdata.youtube.html State that I can retrieve videos uploaded by a user, but ideally I want to use the query method to limit the results for a pagination. The query method is on the Zend framework docs (same page as before under the title 'Searching for videos by metadata') and is similar to this: [code] $yt = new Zend_Gdata_YouTube(); $query = $yt-newVideoQuery(); $query-setTime('today'); $query-setMaxResults(10); $videoFeed = $yt-getUserUploads( NULL, $query ); // Output print ''; foreach($videoFeed as $video): print '' . $video-title . ''; endforeach; print ''; [/code] The problem is I can't do $query-setUser('bbc'). I tried setAuthor but this returns a totally different result. Ideally, I want to use the query method to grab the results in a paginated fashion. How do I use the $query method to set my limits for pagination? Thanks.

    Read the article

  • facebook connect api "Cannot use string offset as an array in" error

    - by Rees
    Please help! I have been grappling with this error for days and I cannot for the life of me figure it out. I am using facebook connect and fetching a "contact_email" attribute using their api method users_getInfo. The issue is that when I execute this PHP file, i get this error: "Cannot use string offset as an array in...". This error specifically refers to this line of code: $firstName=$user_details[0]['contact_email']; I'm thinking this is because the user_getInfo method is not returning any results... However, the most ridiculous part about all this is that, I can execute the code below several dozens of times in a row SUCCESSFULLY without the above error, BUT THEN randomly without changing ANY code at all, I will suddenly encounter this error, in which case it will begin to give me an error several dozens of times, and then AGAIN without any code change, start executing successfully again. This odd behavior occurs regardless of the attribute i am fetching.. (contact_email, first_name, last_name, etc.). I am running php 5.2.11. Is there something I'm missing?? Please Help! include_once 'site/fbconnect/config.php'; //has $api_key and $secret defined. include_once 'site/facebook-platform/client/facebook.php'; global $api_key,$secret; $fb=new Facebook($api_key,$secret); $fb-require_login(); $fb_user=$fb-get_loggedin_user(); $user_details=$fb-api_client-users_getInfo($fb_user,array('last_name','first_name','contact_email')); $email=$user_details[0]['contact_email']; $firstName=$user_details[0]['first_name']; $lastName=$user_details[0]['last_name'];

    Read the article

  • Trouble with Google Finance API

    - by BANSAL MOHIT
    When i am trying to buy shares using google finance api i am getting an exception. Please help run: Enter user ID: **@gmail.com Enter user password: ** Enter transaction type: Buy Enter transaction date (yyyy-mm-dd): 2010-03-10 Enter number of shares (optional, e.g. 100.0): Enter price (optional, e.g. 141.14): 12.0 Enter commission (optional, e.g. 20.0): 23.0 Enter currency (optional, e.g. USD, EUR, JPY): USD Enter any notes: Notes Enter portfolio ID: 1 Enter ticker (EXCHANGE:SYMBOL): NASDAQ:INFY Inserting Entry at location: http://finance.google.com/finance/feeds/default/portfolios/1/positions/NASDAQ:INFY/transactions The server had a problem handling your request. com.google.gdata.util.ServiceForbiddenException: Forbidden Exception message unavailable at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:561) at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:563) at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:536) at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:515) at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:535) at com.google.gdata.client.Service.insert(Service.java:1347) at com.google.gdata.client.GoogleService.insert(GoogleService.java:599) at financetester.Main.insertTransactionEntry(Main.java:169) at financetester.Main.main(Main.java:81) BUILD SUCCESSFUL (total time: 1 minute 4 seconds)

    Read the article

  • Facebook events api: Event member (FQL)

    - by sunil-khedar
    I am fetching the event members for facebook events. Till yesterday I was getting the proper counts of members of an event. But suddenly the counts have following issues: For lot of plans on every consecutive request, I am getting random number of members. Strange issue. Seems facebook servers are not synced properly or something similar. Earlier for the same query string (mentioned below), I was getting the correct counts. But now the count is much less. It seems that at least for a few events now they are sending only the members who are connected with our application (we are using facebook connect). Example: for the following query currently I am getting "31" members. But on event page members count is much more. FQL: FB.Facebook.apiClient.fql_query('SELECT uid, eid, rsvp_status FROM event_member WHERE eid=336671213618', function(result, error){alert(result.length);}); Event page: http://www.facebook.com/event.php?eid=109411842404023 Is there any recent change in facebook API or policies? Thanks in advance.

    Read the article

  • Exporting non-public type through public API

    - by feelgood
    What if I have few factory methods returning non-public type and pairing set of methods which gives variables of this non-public type? This results with titled warning message in NetBeans. In result public API will contain only two pairing sets of methods. The reason is to make my type hierarchy sealed (like seald classes in Scala) and allow users only instantiate these types through factory methods. So we get DSL in some sense. For example, Schedule class represented by calendar fields' contraints. There are some types of contraints - Range, Singleton, List, FullSet - with NumberSet interface as a root. We don't want to expose these types and how Schedule interact with them. We just want the specification from the user. So we make NumberSet package-private. In class Schedule we create few factory-methods for constraints: NumberSet singleton(int value); NumberSet range(int form, int to); NumberSet list(NumberSet ... components); and some methods for creating Schedule object: Schedule everyHour(NumberSet minutes); Schedule everyDay(NumberSet minutes, NumberSet hours); User can only use them in the manner: Schedule s = Schedule.everyDay( singleton(0), list(range(10-15), singleton(8)) ); Is it bad idea?

    Read the article

  • Facebook connect PHP API - friends_get() returns empty array

    - by Soufiane Hassou
    Couple of hours ago I succeed to get friends_get() to return an array of friends, but, now I don't know if it is my fault or something is wrong in facebooks' end (API problems?). Anyway I used a code from their documentation: <?php require_once 'facebook-platform/php/facebook.php'; $appapikey = ''; //CHANGE THIS $appsecret = ''; //CHANGE THIS $facebook = new Facebook($appapikey, $appsecret); //$user_id = $facebook->require_login(); $fb_user=$facebook->get_loggedin_user(); //$fb_user = $facebook->user; $friends = $facebook->api_client->friends_get(); $friends = array_slice($friends, 0, 10); $i=0; foreach ($friends as $friend) { $personArray = $facebook->api_client->users_getInfo($friend,"name"); $person[$i]=$personArray[0]; $i++; } $i=0; foreach ($person as $f) { echo " ".$f['name']; //MORE DETAILS HERE IN STEP 2 echo "<br />"; $i++; } echo "<br />"; ?> The login is working great, but, I can't retrieve the list of friends and I test also with api_client->pages_isFan and it doesn't seem to work too (says not a fan while the user is).

    Read the article

  • Does my API design violate RESTful principles?

    - by peta
    Hello everybody, I'm currently (I try to) designing a RESTful API for a social network. But I'm not sure if my current approach does still accord to the RESTful principles. I'd be glad if some brighter heads could give me some tips. Suppose the following URI represents the name field of a user account: people/{UserID}/profile/fields/name But there are almost hundred possible fields. So I want the client to create its own field views or use predefined ones. Let's suppose that the following URI represents a predefined field view that includes the fields "name", "age", "gender": utils/views/field-views/myFieldView And because field views are kind of higher logic I don't want to mix support for field views into the "people/{UserID}/profile/fields" resource. Instead I want to do the following: utils/views/field-views/myFieldView/{UserID} Though Leonard Richardson & Sam Ruby state in their book "RESTful Web Services" that a RESTful design is somehow like an "extreme object oriented" approach, I think that my approach is object oriented and therefore accords to RESTful principles. Or am I wrong? When not: Are such "object oriented" approaches generally encouraged when used with care and in order to avoid query-based REST-RPC hybrids? Thanks for your feedback in advance, peta

    Read the article

  • Dynamic Google Maps API InfoWindow HTML Content

    - by Peter Hanneman
    I am working in Flash Builder 4 with Google Map's ActionScript API. I have created a map, loaded some custom markers onto it and added some MouseEvent listeners to each marker. The trouble comes when I load an InfoWindow panel. I want to dynamically set the htmlContent based off of information stored in a database. The trouble is that this information can change every couple of seconds and each marker has a unique data set so I can not statically set it at the time I actually create the markers. I have a method that will every minute or so load all of the records from my database into an Object variable. Everything I need to display in the htmlContent is contained in this object under a unique identifier. The basic crux of the problem is that there is no way for me to uniquely identify an info window, so I can not determine what information to pull into the panel. marker.addEventListener(MapMouseEvent.ROLL_OVER, function(e:MapMouseEvent):void { showInfoWindow(e.latLng) }, false, 0, false); That is my mouse event listener. The function I call, "showInfowindow" looks like this: private function showInfoWindow(latlng:LatLng):void { var options:InfoWindowOptions = new InfoWindowOptions({title: appData[*I NEED A UNIQUE ID HERE!!!*].type + " Summary", contentHTML: appData[*I NEED A UNIQUE ID HERE!!!*].info}); this.map.openInfoWindow(latlng, options); } I thought I was onto something by being able to pass a variable in my event listener declaration, but it simply hates having a dynamic variable passed through, it only returns the last value use. Example: marker.addEventListener(MapMouseEvent.ROLL_OVER, function(e:MapMouseEvent):void { showInfoWindow(e.latLng, record.unit_id) }, false, 0, false); That solution is painfully close to working. I iterate through a loop to create my markers when I try the above solution and roll over a marker I get information, but every marker's information reflects whatever information the last marker created had. I apologize for the long explaination but I just wanted to make my question as clear as possible. Does anyone have any ideas about how to patch up my almost-there-solution that I posted at the bottom or any from the ground up solutions? Thanks in advance, Peter Hanneman

    Read the article

  • Java Sound API: Capturing sound output from a Target Port

    - by Kyle Kampy
    I'm writing a simple piece of software that streams audio over LAN. I have all of the network parts implemented, but what I'm stumbling on is using the Java Sound API. I have successfully captured audio from the microphone, and line-in, but I can't seem to capture from any target ports, like the speakers. My question is, is it possible to capture from the Master target port? Here is the piece of code that works on initializing the line. private boolean startCapture(){ try{ DataLine.Info info = new DataLine.Info( TargetDataLine.class, format); line = (TargetDataLine)AudioSystem.getLine(info); audioBuffer = new byte[bufferSize]; line.open(format); line.start(); return true; }catch(Exception e){ System.out.println("Exception thrown when capturing audio:\n" + e); return false; } } Running the code like this will just use the microphone as my line. Here is info about my sound system. Most important is probably the fact that I'm running Linux. Thanks in advance for any and all help you can give me.

    Read the article

  • Node.js fetching Twitter Streaming API - EADDRNOTAVAIL

    - by Jordan Scales
    I have the following code written in node.js to access to the Twitter Streaming API. If I curl the URL below, it works. However, I cannot get it to work with my code. var https = require('https'); https.request('https://USERNAME:[email protected]/1.1/statuses/sample.json', function(res) { res.on('data', function(chunk) { var d = JSON.parse(chunk); console.log(d); }); }); But I receive the following node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: connect EADDRNOTAVAIL at errnoException (net.js:642:11) at connect (net.js:525:18) at Socket.connect (net.js:589:5) at Object.<anonymous> (net.js:77:12) at new ClientRequest (http.js:1073:25) at Object.request (https.js:80:10) at Object.<anonymous> (/Users/jordan/Projects/twitter-stream/app.js:3:7) at Module._compile (module.js:441:26) at Object..js (module.js:459:10) at Module.load (module.js:348:31) If anyone can offer an alternative solution, or explain to me why this doesn't work, I would be very grateful.

    Read the article

  • Returning a Value From the Bit.ly JS API Callback

    - by mtorbin
    Hey all, I am attempting to turn this "one shot" script into something more extensible. The problem is that I cannot figure out how to get the callback function to set a value outside of itself (please note that references to the Bit.ly API and the prototype.js frame work which are required have been left out due to login and apiKey information): CURRENTLY WORKING CODE var setShortUrl = function(data) { var resultOBJ, myURL; for(x in data.results){resultOBJ = data.results[x];} for(key in resultOBJ){if(key == "shortUrl"){myURL = resultOBJ[key];}} alert(myURL); } BitlyClient.shorten('http://www.thinkgeek.com', 'setShortUrl'); PROPOSED CHANGES var setShortUrl = function(data) { var resultOBJ, myURL; for(x in data.results){resultOBJ = data.results[x];} for(key in resultOBJ){if(key == "shortUrl"){myURL = resultOBJ[key];}} alert(myURL); return myURL; } var myTEST = BitlyClient.shorten('http://www.thinkgeek.com', 'setShortUrl'); alert(myTEST); As you can see this doesn't work the way I'm am expecting. If I could get a pointer in the right direction it would be most appreciated. Thanks, MT

    Read the article

  • using paypals html api is safe?

    - by ajsie
    im trying out paypals html api where you specify price, item_name, customer information and so on in the html: <form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="payPalForm"> <input type="hidden" name="cmd" value="_cart" /> <input type="hidden" name="upload" value="1" /> <input type="hidden" name="no_note" value="1" /> <input type="hidden" name="business" value="[email protected]" /> <input type="hidden" name="currency_code" value="SEK" /> <input type="hidden" name="return" value="http://freelanceswitch.com/payment-complete/" /> <input type="hidden" name="tax_rate" value="25" /> <input type="hidden" name="item_name_1" value="Apple Macpro" /> <input type="hidden" name="item_number_1" value="01 - Product 1" /> <input type="hidden" name="amount_1" value="25000" /> <input type="hidden" name="item_name_2" value="Apple Macbook" /> <input type="hidden" name="item_number_2" value="02 - Product 2" /> <input type="hidden" name="amount_2" value="12500" /> <input type="hidden" name="item_name_3" value="Apple Macbook Air" /> <input type="hidden" name="item_number_3" value="03 - Product 3" /> <input type="hidden" name="amount_3" value="12500" /> <input type="submit" name="Submit" value="Submit" /> </form> when the user clicks submit it takes him/her to paypals payment page. but doesn't this mean that a hacker could change the order by manipulating the html code? i can´t figure out how paypal prevents this security problem.

    Read the article

  • Provisioning Api using java

    - by user268515
    Hi i'm working in java and tried to retrieve all the user in the domain for that i used Provisionin api............ Its working good But my idea is to Use 2-legged OAuth to retrieve the users from the domain Is it Possible? I dont how to specify the URL please Help me And i triede the following the program final String CONSUMER_KEY = "xxxxxxxxxx.com"; final String CONSUMER_SECRET = "12345678122154154df9"; final String DOMAIN = "xxxxxxxxxx.com"; GoogleOAuthParameters oauthParameters = new GoogleOAuthParameters(); oauthParameters.setOAuthConsumerKey(CONSUMER_KEY); oauthParameters.setOAuthConsumerSecret(CONSUMER_SECRET); oauthParameters.setOAuthType(OAuthType.TWO_LEGGED_OAUTH); OAuthHmacSha1Signer signer = new OAuthHmacSha1Signer(); URL feedUrl = new URL("https://apps-apis.google.com/a/feeds/" + DOMAIN + "/user/2.0/[email protected]"); userService = new UserService("Myapplication"); userService.setOAuthCredentials(oauthParameters, signer); userService.useSsl(); UserFeed allUsers = new UserFeed(); UserFeed allpage; Link nextLink; do { allpage = userService.getFeed(feedUrl, UserFeed.class); allUsers.getEntries().addAll(allpage.getEntries()); nextLink = allpage.getLink(Link.Rel.NEXT, Link.Type.ATOM); if (nextLink != null) { feedUrl = new URL(nextLink.getHref()); } }while (nextLink != null); return allUsers; } Its returing the error as com.google.gdata.util.AuthenticationException: Unknown authorization header

    Read the article

  • Problem with twitter API: cannot update status

    - by PainBringer
    I am trying to create Google Chrome extension that will send interesting links to twitter. But, I am unable to connect to the Twitter. The server gets my request, but the response is always the same: "You do not have permission to access /1/statuses/update.json on this server (403 Forbidden)." I am using Wireshark to inspect Http responses. Here is the code of the function i am using: function setStatus(msg) { var status = "status="+msg; var client = new XMLHttpRequest(); client.open("POST","http://api.twitter.com/1/statuses/update.json"); client.setRequestHeader("Authorization", "Basic <user credentials>"); client.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); client.onreadystatechange = function(){ if(client.readyState ==4){ //whatever } } client.send(status); Am I doing something wrong? I am using Basic Auth. I use this tool to do the encoding, and just put the result instead of . Also, can someone give me an example of OAuth?

    Read the article

  • JPA2 Criteria API creates invalid SQL when using groupBy

    - by Stephan
    JPA2 with the Criteria API seems to generate invalid SQL for PostgreSQL. For this code: Root<DBObjectAccessCounter> from = query.from(DBObjectAccessCounter.class); Path<DBObject> object = from.get(DBObjectAccessCounter_.object); Expression<Long> sum = builder.sumAsLong(from.get(DBObjectAccessCounter_.count)); query.multiselect(object, sum).groupBy(object); I get the following exception: ERROR: column "dbobject1_.id" must appear in the GROUP BY clause or be used in an aggregate function The generated SQL is: select dbobjectac0_.object_id as col_0_0_, sum(dbobjectac0_.count) as col_1_0_, dbobject1_.id as id1001_, dbobject1_.name as name1013_, dbobject1_.lastChanged as lastChan2_1013_, dbobject1_.type_id as type3_1013_ from DBObjectAccessCounter dbobjectac0_ inner join DBObject dbobject1_ on dbobjectac0_.object_id=dbobject1_.id group by dbobjectac0_.object_id Obviously, the first item of the select statement (dbobjectac0_.object_id) does not match the group by clause. Simplified example It does not even work for this simple example: Root<DBObjectAccessCounter> from = query.from(DBObjectAccessCounter.class); Path<DBObject> object = from.get(DBObjectAccessCounter_.object); query.select(object).groupBy(object); which returns select dbobject1_.id as id924_, dbobject1_.name as name933_, dbobject1_.lastChanged as lastChan2_933_, dbobject1_.type_id as type3_933_ from DBObjectAccessCounter dbobjectac0_ inner join DBObject dbobject1_ on dbobjectac0_.object_id=dbobject1_.id group by dbobjectac0_.object_id Does anyone know how to fix this?

    Read the article

  • How to use Festival Text To Speech C/C++ API

    - by Peeyush
    I want to use Festival TTS with my C++ programme. So i have downloaded all files form http://www.cstr.ed.ac.uk/downloads/festival/2.0.95/ then i start reading manual(http://www.cstr.ed.ac.uk/projects/festival/manual/festival_28.html) for C++ API but in manual they says that: In order to use Festival you must include festival/src/include/festival.h' which in turn will include the necessary other include files infestival/src/include' and speech_tools/include' you should ensure these are included in the include path for you your program. Also you will need to link your program withfestival/src/lib/libFestival.a', speech_tools/lib/libestools.a',speech_tools/lib/libestbase.a' and `speech_tools/lib/libeststring.a' as well as any other optional libraries such as net audio. " I am using UBUNTU 10.04(festival package is by default installed and i can use it form terminal by festival command) and GCC 4.4.3 but the problem is that i am new to GCC and i am not understanding which files i have to include in order to run my C++ code and i also don't know how to link libraries with my c++ code. So please tell me exactly which files i have to include and how to link with libraries if anyone already use festival tts with c++ then please post your code Thanks

    Read the article

  • facebook javascript api

    - by ngreenwood6
    I am trying to get my status from facebook using the javascript api. I have the following code: <div id="fb-root"></div> <div id="data"></div> <script src="http://connect.facebook.net/en_US/all.js"></script> <script type="text/javascript"> (function(){ FB.init({ appId : 'SOME ID', status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); }); getData(); function getData(){ var query = FB.Data.query('SELECT message FROM status WHERE uid=12345 LIMIT 10'); query.wait(function(rows) { for(i=0;i<rows.length;i++){ document.getElementById('data').innerHTML += 'Your status is ' + rows[i].message + '<br />'; } }); } </script> When i try to get my name it works fine but the status is not working. Can someone please tell me what I am doing wrong because the documentation for this is horrible. And yes I replaced the uid with a fake one and yes i put in my app id because like i said when i try to get my name it works fine. Any help is appreciated.

    Read the article

  • Posting status via Facebook's graph api

    - by Simon R
    In PHP, I am trying to post a status to our Facebook fan page using the graph api, despite following the intructions facebook give, the following code does not seem to update the status. Here is the code; $xPost['access_token'] = "{key}"; $xPost['message'] = "Posting a message test."; $ch = curl_init('https://graph.facebook.com/{page_id}/feed'); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 120); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $xPost); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($ch, CURLOPT_CAINFO, NULL); curl_setopt($ch, CURLOPT_CAPATH, NULL); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0); $result = curl_exec($ch); Does anyone know why this code is not working? The access_token is correct.

    Read the article

  • Google Translation API

    - by Nimesh
    I have text that I would like to translate into Russian. The text has custom tags and has multiple <BR> tags. The API behaves oddly with <BR> tags. Are there known issues with <BR> tags? Is there a way around it or what is the best way to use Google JQuery tranlsation to translate the text? The text is <INPUTANSWER PARTID='1'> <SPAN STYLE="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN> Place a <STRONG>90 degree</STRONG> explicit angle constraint to the inside faces of <STRONG>DP-1007:1 </STRONG>and<STRONG>DP-1006:1</STRONG> as shown.</P> <P STYLE="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"> 2. <SPAN STYLE="FONT: 7pt 'Times New Roman'"> </SPAN> Drive this angle constraint between <STRONG>90 and 100 degrees</STRONG> with an <STRONG>increment</STRONG> <STRONG>of 0.125 degrees.</STRONG> </INPUTANSWER>

    Read the article

  • Facebook new js api and cross-domain file

    - by vondip
    Hi all, I am building a simple facebook iframe application. I've decided since the code is separate from facebook none the less, I will also create a connect website as well. In my connect website I'm trying to figure out the following: I am using facebook's new api and I am calling the init function. I can't seem to figure out where I combine my cross-domain file. There's no mention of it in their documentation either. http://developers.facebook.com/docs/reference/javascript/FB.init I am referring to these lines of code: <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({appId: 'your app id', 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>

    Read the article

  • Facebook API - delete status

    - by Simon R
    In PHP, I'm using curl to send a delete to the fb graph api - and yet I'm getting the following error; {"error":{"type":"GraphMethodException","message":"Unsupported delete request."}} The code I'm using is; $ch = curl_init("https://graph.facebook.com/" . $status_id . ""); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_TIMEOUT, 120); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $query); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_CAINFO, NULL); curl_setopt($ch, CURLOPT_CAPATH, NULL); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0); $result = curl_exec($ch); echo $result; $query contains the access token.

    Read the article

  • Google Spreadsheet API problem: memory exceeded

    - by Robbert
    Hi guys, Don't know if anyone has experience with the Google Spreadsheets API or the Zend_GData classes but it's worth a go: When I try to insert a value in a 750 row spreadsheet, it takes ages and then throws an error that my memory limit (which is 128 MB!) was exceeded. I also got this when querying all records of this spreadsheet but this I can imaging because it's quite a lot of data. But why does this happen when inserting a row? That's not too complex, is it? Here's the code I used: public function insertIntoSpreadsheet($username, $password, $spreadSheetId, $data = array()) { $service = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME; $client = Zend_Gdata_ClientLogin::getHttpClient($username, $password, $service); $client->setConfig(array( 'timeout' => 240 )); $service = new Zend_Gdata_Spreadsheets($client); if (count($data) == 0) { die("No valid data"); } try { $newEntry = $service->insertRow($data, $spreadSheetId); return true; } catch (Exception $e) { return false; } }

    Read the article

  • Delphi Pascal / Windows API - Small problem with SetFilePointerEx and parameter FILE_END

    - by SuicideClutchX2
    I know I am about to be slapped by at least one person who was helping me with this API. Alright I have been able to use SetFilePointerEx just fine, when setting the position only. SetFilePointerEx(PD,512,@PositionVar,FILE_BEGIN); SetFilePointerEx(PD,0,@PositionVar,FILE_CURRENT); Both work, I can set positions and even check my current one. But when I set FILE_END as per the documentation no matter what the second parameter is and whether or not i provide a pointer for the third parameter it fails even on a valid handle that many other operations are able to use without fail. For Example: SetFailed := SetFilePointerEx(PD,0,@PositionVar,FILE_END); SetFailed := SetFilePointerEx(PD,0,nil,FILE_END); Whatever I put it fails. I am working with a handle to a physical disk and it most definitely has an end. SetFilePointer works just fine its just a little more trouble than I would like. Its not the end of the world, but whats happening.

    Read the article

  • Load collections eagerly in NHibernate using Criteria API

    - by Zuber
    I have an entity A which HasMany entities B and entities C. All entities A, B and C have some references x,y and z which should be loaded eagerly. I want to read from the database all entities A, and load the collections of B and C eagerly using criteria API. So far, I am able to fetch the references in 'A' eagerly. But when the collections are loaded, the references within them are lazily loaded. Here is how I do it AllEntities_A = _session.CreateCriteria(typeof(A)) .SetFetchMode("x", FetchMode.Eager) .SetFetchMode("y", FetchMode.Eager) .List<A>().AsQueryable(); The mapping of entity A using Fluent is as shown below. _B and _C are private ILists for B & C respectively in A. Id(c => c.SystemId); Version(c => c.Version); References(c => c.x).Cascade.All(); References(c => c.y).Cascade.All(); HasMany<B>(Reveal.Property<A>("_B")) .AsBag() .Cascade.AllDeleteOrphan() .Not.LazyLoad() .Inverse() .Cache.ReadWrite().IncludeAll(); HasMany<C>(Reveal.Property<A>("_C")) .AsBag() .Cascade.AllDeleteOrphan() .LazyLoad() .Inverse() .Cache.ReadWrite().IncludeAll(); I don't want to make changes to the mapping file, and would like to load the entire entity A eagerly. i.e. I should get a List of A's where there will be List of B's and C's whose reference properties will also be loaded eagerly

    Read the article

< Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >