Hello friends
Let me tell u first that, i am using Album feed along with CURL on C
programming language, and not using Any client library.

Now Authentication with google is happening and i am getting all
tokens, but when i went to fetch Album feed for any user it gives me
following answer.


HTTP/1.0 200 OK
Expires: Tue, 08 Mar 2011 06:02:49 GMT
Date: Tue, 08 Mar 2011 06:02:49 GMT
Cache-Control: private, max-age=0, must-revalidate, no-transform
Set-Cookie: _rtok=V2eWJcUofB3o; Path=/; Secure; HttpOnly
Set-Cookie: S=photos_html=cWCeeeU4xZtucjLsQQnW-g; Domain=.google.com;
Path=/; Secure; HttpOnly
Content-Type: application/atom+xml; charset=UTF-8
Vary: Accept, X-GData-Authorization, GData-Version, Cookie
GData-Version: 1.0
Last-Modified: Sat, 05 Mar 2011 07:02:05 GMT
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE





below i am giving few lines of code i am using for Data fetching,
someone might help em find out what the problem is.




        const char *request1 = "https://picasaweb.google.com/data/feed/
api/user/patel.hemanshu.04/?kind=album";
        char request[2048];
        sprintf(request,"GET %s&access=visible\r\n\r\n",request1);
        fprintf(stderr,"Request: %s\n",request);

        curl = curl_easy_init();
        if(curl) {
                curl_easy_setopt(curl, CURLOPT_URL,request1);
                /* Do not do the transfer - only connect to host */
                curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
                res = curl_easy_perform(curl);
                if(CURLE_OK != res)
                {
                        fprintf(stderr,"GetAlbums:curl_easy_setopt:
Error: %s\n", strerror(res));
                        XML=NULL;
                        return;
                }
                res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET,
&sockextr);

                if(CURLE_OK != res)
                {
                        fprintf(stderr,"GetAlbums:curl_easy_getinfo:
Error: %s\n", curl_easy_strerror(res));
                        XML=NULL;
                        return;
                }



        sockfd = sockextr;

                puts("Waiting Sending request.");
                /* wait for the socket to become ready for sending */
                if(!wait_on_socket(sockfd, 0, 60000L))
                {
                        fprintf(stderr,"Error: timeout.\n");
                        XML=NULL;
                        return;
                }

                puts("Sending request.");
                /* Send the request. Real applications should check
the iolen
                *      * to see if all the request has been sent */
                res = curl_easy_send(curl, request, strlen(request),
&iolen);

                if(CURLE_OK != res)
                {
                        fprintf(stderr,"GetAlbums:curl_easy_send:
Error: %s\n", curl_easy_strerror(res));
                        XML=NULL;
                        return;
                }
                fprintf(stderr,"Sent Data: %u request length: %u
Reading response.",iolen,strlen(request));



                /* read the response */
                for(;;)
                {
                        char buf[1024];
                        strcpy(buf,"\n");
                        wait_on_socket(sockfd, 1, 60000L);
                        res = curl_easy_recv(curl, buf, 1024, &iolen);

                        if(CURLE_OK != res)
                                break;

                        printf("Received %u bytes.\n", iolen);
        //              fprintf(stderr,"%s",buf);
                        strcat(XML,buf);
                }

                /* always cleanup */
                curl_easy_cleanup(curl);




Can any one suggest what is wrong in my communication with google
api's?

it gives 200 OK and no error and yet not returning the XML it is
suppose to.

Cheers,

Hemanshu Patel

-- 
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-picasa-data-api?hl=en.

Reply via email to