Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

album delete request fails #20

Closed
petem opened this issue Aug 27, 2010 · 3 comments
Closed

album delete request fails #20

petem opened this issue Aug 27, 2010 · 3 comments

Comments

@petem
Copy link

petem commented Aug 27, 2010

I wish to delete an album, so I use this code ..

NSMutableDictionary*    params  = [NSMutableDictionary dictionaryWithObject:@"delete" forKey:@"method"];
[appDelegate.facebook requestWithGraphPath:[cellDict objectForKey:@"aid"]  andParams:params  andHttpMethod:@"POST"  andDelegate:nil];

Here's the request/response flow ...

2010-08-27 22:17:02.575 ShareOrStare[19975:207] request: <NSMutableURLRequest https://graph.facebook.com/100000364547939_20156?method=delete&sdk=ios&access_token=1xxx&format=json>
2010-08-27 22:17:03.552 ShareOrStare[19975:207] response: {"error":{"type":"Exception","message":"(#100) Invalid parameter"}}

The album exists and the ID is correct. What is the issue here?

@yujuan
Copy link

yujuan commented Aug 27, 2010

Please check our developer website for how to formulate the the parameter. Especially http://developers.facebook.com/docs/api

You can also check our developer Forum on how the Graph Api work
http://forum.developers.facebook.net/viewforum.php?id=52

Thanks!

@petem
Copy link
Author

petem commented Aug 27, 2010

I'm familiar with the forum and I even contribute. I'm also aware of the first document you cited. Isn't my parameter setting consistent with that document. BTW, I also tried quotes around the AID because of the underscore. It gave a different error message but still unhelpful.

Thinking that you may be suggesting use of the DELETE method, I've tried the latter form of ...
#if 0
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObject:@"delete" forKey:@"method"];
[appDelegate.facebook requestWithGraphPath:[cellDict objectForKey:@"aid"] andParams:params andHttpMethod:@"POST" andDelegate:nil];
#else
NSMutableDictionary* params = [NSMutableDictionary dictionary]; // required even if empty
NSLog(@"aid: %@", [cellDict objectForKey:@"aid"]);
[appDelegate.facebook requestWithGraphPath:[cellDict objectForKey:@"aid"] andParams:params andHttpMethod:@"DELETE" andDelegate:nil];
#endif

and I get this logged ...

2010-08-28 08:55:57.244 ShareOrStare[20185:207] aid: 100000364547939_20156
2010-08-28 08:55:57.246 ShareOrStare[20185:207] request: <NSMutableURLRequest https://graph.facebook.com/100000364547939_20156?format=json&sdk=ios&access_token=XXX>
2010-08-28 08:55:58.875 ShareOrStare[20185:207] response: {"error":{"type":"Exception","message":"(#100) Invalid parameter"}}

Could you perhaps indicate where I'm wrong? Thanks.

@yujuan
Copy link

yujuan commented Aug 28, 2010

Unfortunately, We do not support album delete right now. We are working on making our api more complete, but that will take some time. Please check back with us.Thanks

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants