Subversion Repository Public Repository

Nextrek

Diff Revisions 465 vs 466 for /iOS/SafariArte/trunk/SafariArte/Controllers/FinalQuizVC/FinalQuizVC.m

Diff revisions: vs.
  @@ -59,6 +59,8 @@
59 59
60 60 [self.table reloadData];
61 61
62 + [DATAMANAGER showMessageWithAlert:self message:NSLocalizedString(@"ShareRoute", nil) tag:004];
63 +
62 64 }
63 65
64 66
  @@ -248,12 +250,40 @@
248 250 {
249 251
250 252 if(alertView.tag == 02) {
251 -
253 + [alertView close];
252 254 [self goToHome:self];
253 255
254 256 }
255 -
256 - [alertView close];
257 + if (alertView.tag == 004) {
258 + if (buttonIndex == 0) {
259 +
260 +
261 + NSDictionary *properties = @{
262 + @"og:type": @"article",
263 + @"og:title": self.routeForDetail.routeLabel,
264 + @"og:description": [NSString stringWithFormat:NSLocalizedString(@"FBSharingMessage", nil),self.routeForDetail]
265 + };
266 + FBSDKShareOpenGraphObject *object = [FBSDKShareOpenGraphObject objectWithProperties:properties];
267 +
268 + // Create an action
269 + FBSDKShareOpenGraphAction *action = [[FBSDKShareOpenGraphAction alloc] init];
270 + action.actionType = @"news.publishes";
271 + [action setObject:object forKey:@"article"];
272 +
273 + FBSDKShareOpenGraphContent *content = [[FBSDKShareOpenGraphContent alloc] init];
274 + content.action = action;
275 + content.previewPropertyName = @"article";
276 +
277 + [FBSDKShareDialog showFromViewController:self
278 + withContent:content
279 + delegate:self];
280 +
281 + }else
282 + {
283 + [alertView close];
284 + }
285 +
286 + }
257 287 }
258 288
259 289