Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-18-2011, 02:27 PM   #1 (permalink)
Registered Member
 
Join Date: Nov 2011
Posts: 1
burnsy is on a distinguished road
Default Facebook Graph Api

Hopefully someone out there can help. Spent the last 12 days on this...In my app I can:

1) Log into Facebook with this:[facebook authorize:permissions];
where my permissions are read_stream,publish_stream,user_photos.

2) Access my profile with this:[facebook requestWithGraphPath:@"me" andDelegate:self];
All my account info is returned successfully.

3) Successfully Upload a photo (and receive the returned photo ID) with this:

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:projectPhoto.image, @"picture",@"privacy",@"EVERYONE",nil];

[facebook requestWithGraphPath:@"me/photos" andParams:params andHttpMethod:@"POST" andDelegate:self];

Now that I have the ID of the uploaded photo (which, the photo by the way, uploaded to an album created for my app automatically) I want to find out the URL of the photo so I can use it in a feed post later in the app. So here's what I call next:

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"id",[result objectForKey:@"id"],nil];
(for testing purposes, I don't use this result variable...I actually type the ID like this @"123456789123456789132" instead...just to be sure)

[facebook requestWithGraphPath:@"me/photos" andParams:params andHttpMethod:@"GET" andDelegate:self];

The result is:
Result of API call: { data = ( ); }

Here's the strange part. When I log into my Facebook account and tag the uploaded photo as me being in it, this last query works and returns the URL I'm looking for.

Please help if you can! Thank you!
burnsy is offline   Reply With Quote
Reply

Bookmarks

Tags
facebook graph api

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 391
18 members and 373 guests
7twenty7, Alex-alex, Apptronics RBC, baja_yu, chiataytuday, dre, e2applets, ipodphone, jeroenkeij, jleannex55, leostc, matador1978, mbadegree, n00b, pbart, QuantumDoja, Retouchable, usernametaken
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,125
Posts: 402,910
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:27 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0