Is it possible to answer to an facebook event using an app? - ios

Is it possible to answer to an event using facebook connect, by calling the method requestwithgraphpath like this:
[[Facebook shared] requestWithGraphPath:link/attending andParams:params2 andHttpMethod:#"POST" andDelegate:self];
What about changing the answer? (Do I have to call "DELETE" to attending and then call "POST" to maybe or declined ?)
I am using the permissions rsvp_event and user_events

There's a blog post here from when the API was last updated with an example of some of the API calls, the main docs are at https://developers.facebook.com/docs/reference/api/event/
Basically, to remove a user from the event it's a DELETE to /{event id}/invited - this one may require the 'create_event' permission as it's a modification to the event, i'm not 100% sure.
To change RSVP status it's a POST to /{event id}/{status} where {status} is one of attending, maybe, declined

Related

Sharekit is authorizing but not sharing

I know there are a lot of topics on this issue, but I just can't figure out what is wrong.
I want to implement sharekit for Facebook and Twitter, so I followed the install instructions on the github:
Appid is set, got my entry in the cfurlschemes thingy, etc.
I authorize my app:
- (void)authorizeFacebook {
[self.facebook authorize];
}
(self.facebook is a strong member of a share controller singleton).
To share:
- (void)shareFacebook:(SHKItem*)toShare {
[SHKFacebook shareItem:toShare];
}
I also tried:
- (void)shareFacebook:(SHKItem*)toShare {
[self.facebook setItem:toShare];
[self.facebook share];
}
The same constructions are made for twitter.
I can authorize my apps without issue, so my configuration should be fine. When I authorize my app before i call the shareFacebook function, it is authorized but nothing happens with the sharing.
When I don't auhorize before calling shareFacebook (so sharekit detects it is not authorizes and opens authorization first) the'sharekitSendDidFinish' notification is fired but nothing appears on Facebook.
The same goes for Twitter, authorization works but no tweets appear. The SHKItem i'm trying to share is not nil and is filled with the correct stuff I need to share.
*Edit
I'm trying to share an SHKItem with:
Title
Text
Image
I also tried to send an SHKItem with just text, but that didn't work either.
Reinstalling ShareKit did nothing.
Failed with error is not being fired
Senddidfinish is being fired (but only if you authorize via the share function) and has no 'last error'
Solved it, I forgot to set the sharetype... stupid that it doesnt give an error for this :S

Callback for Youtube Subscription Button

Is there a way to get a callback if a user subscribes to a youtube channel via a subscription_center ( http://www.youtube.com/t/creators_downloads ) button? Doing an onclick on the link does not guarantee a user subscribed. Thanks
I'm sorry, but there's no API around that button at this time.
turns out they have added a callback now.
https://developers.google.com/youtube/youtube_subscribe_button#Handling_Events

Facebook iOS SDK - Simple status update with Dialog

I'm trying to post a simple status update on the Facebook iOS SDK. At the moment, if I include the link parameter, everything will work:
NSMutableDictionary *params =
[NSMutableDictionary dictionaryWithObjectsAndKeys:
#"Name here", #"name",
#"Caption here", #"caption",
#"Status update", #"description",
#"http://www.apple.com.",#"link",
nil];
[facebook dialog:#"feed"
andParams:params
andDelegate:self];
But once I remove link none of the remaining parameters are acknowledged and I'm left with a blank message. I simply want to perform the same sort of post you can achieve with Facebook request whereby providing a string for the message parameter is enough for the status update.
Not sure where I'm going wrong.
Actually posing of status messages with feed dialog isn't an option and it's actually not intended to be user like this.
You can consider one of the options:
Requesting publish_stream permission and than issue POST request to Graph API with message parameter (feed connection of user object), see statuses connection documentation (IMO it seems as an good way to go, if you don't afraid to ask publish_stream permission).
Open Facebook App with publishing view (and text pre-filled?), this is described in answer to "How to programmatically open iOS Facebook app with pre-populated status?"
Note: I'm not completely sure about inability to achieve this with feed dialog, so I may be wrong, anyone who know this isn't the case please correct me.

Dialog 'apprequests' friend invites send OK but never get through. (iOS)

I'm having problems getting friend invites working. They seem to be being sent OK (I don't get any errors from the iOS delegates) but the invites never appear on the receivers FB account. I'm using iOS SDK and logging in with test users. The code I'm using to create the invite dialog is:
NSMutableDictionary* dict = [NSMutableDictionary dictionary];
[dict setValue:#"Accept my invite" forKey:#"message"];
[_facebook dialog:#"apprequests" andParams:dict andDelegate:self];
This brings up the dialog where I can select friends to invite. When I hit Send the dialog vanishes and no errors are returned. Problem is that the invites are never received by the people I send them to.
I have set my canvas url, so according to other posts on SO everything should be working fine... but they are not.
Thanks for any suggestions.
Actually this is explained in Requests documentation:
User to User Requests are only available for Canvas apps, not websites, as accepting a request will direct the user to the Canvas Page URL of the app that sent the Request.
Same stated about App to User requests as well.
This is probably not only because Canvas URL, but also application type (I guess it shouldn't be native to display request)
In fact requests are sent but users not able to see 'em. You can access requests (via Graph API) for users of your application and display 'em in your app.
Solution: (Sending Invitations, getting ID in response, but no Notification alert or request on facebook.......).
Please first remove all requests from your facebook. Then send invitation.(If getting ID in response), then it will be shown 100%.
This is a problem with facebook, it doesn't shows latest requests on top if max notifications/requests reached.(It hides new notifications/request).

Like button in iOS application

Does anybody know how to place Facebook "like" button into iOS application? I've tried the method described in this blog post. But I do not really like this method, because its ugly Login dialog. And, what is more important, it makes user login twice. For example, user wants post a message to his wall if he isn't logged in I call standard FBLoginDialog, after that user posted a message he may want push "like" button and he have to login again - it is really bad user experience.
How to be? How can I give user "like" feature in my iOS app?
That is actually the only way to do it. There is no special iOS like button. However, the good news is that just today Facebook announced single sign in support for mobile apps. This should remove some of the burden the user faces to log in to facebook.
It seems there is an agreement on not being able to do this. This question shows you can, as does the FB Graph API documentation:
You can comment on or like any object that has a /comments or /likes
connection by posting to https://graph.facebook.com/OBJECT_ID/comments
and https://graph.facebook.com/OBJECT_ID/likes, respectively.
Unfortunately, according to this question you can’t like a page.
I like using ShareKit: http://www.getsharekit.com/
It's not exactly what you're looking for, but still...
The only way supported by Facebook on any platform (web, mobile, etc) is from their iFrame code. From iOS, that means embedding a UIWebView into your application with the iFrame code. Note that it does require them to login via Safari.
- (void)addLikeButton{
[FBSettings enableBetaFeature:TRUE];
[FBSettings enablePlatformCompatibility:NO];
_like = [[FBLikeControl alloc] init];
_like.frame = CGRectMake(60,12,200,33);
_like.likeControlAuxiliaryPosition = FBLikeControlAuxiliaryPositionInline;
_like.likeControlHorizontalAlignment = FBLikeControlHorizontalAlignmentLeft;
_like.objectID = #"https://www.facebook.com/pages/Strana-Gapra/1377227779244834";
_like.likeControlStyle = FBLikeControlStyleStandard ;
[_like addTarget:self action:#selector(onSelect:) forControlEvents:UIControlEventValueChanged];
[self.likeView addSubview:_like];
[self performSelector:#selector(getLikeSubviews) withObject:nil afterDelay:0.6];
}

Resources