SHARE
TWEET

Untitled

a guest Jun 1st, 2013 130 Never
  1. <script type="text/javascript">
  2. window.location.href="fbconnect://success?
  3. post_id=<MyFbUserID>_253268854729889#_=_";
  4. </script>
  5.        
  6. #import "Facebook.h"
  7. #import "FBConnect.h"
  8. #import "FBDialog.h"
  9.  
  10. @interface MyAppModelClass :  NSObject <FBDialogDelegate, FBSessionDelegate>  {
  11.  
  12. @property (nonatomic, retain) Facebook* facebook;
  13. }
  14.        
  15. #import "MyAppModelClass.h"
  16.  
  17. @synthesize facebook;
  18.  
  19.  
  20. #pragma mark -
  21. #pragma mark FBDialogDelegate
  22.  
  23.  
  24. - (void) dialogDidComplete: (FBDialog*) dialog {
  25.    NSLog(@"<FBDialogDelegate>.dialogDidComplete: %@", dialog);
  26. }
  27.  
  28.  
  29. - (void) dialogCompleteWithUrl:(NSURL*) url {
  30.    NSLog(@"<FBDialogDelegate>.dialogDidCompleteWithURL: %@", url);
  31. }
  32.  
  33.  
  34. - (void) dialogDidNotComplete:(FBDialog*) dialog {
  35.    NSLog(@"<FBDialogDelegate>.dialogDidNotComplete: %@", dialog);
  36. }
  37.  
  38. - (void)dialogDidNotCompleteWithUrl:(NSURL*) url {
  39.     NSLog(@"<FBDialogDelegate>.dialogDidNotCompleteWithUrl: %@", url);
  40. }
  41.  
  42.  
  43. - (void)dialog:(FBDialog*)dialog didFailWithError:(NSError*) error{
  44.     NSLog(@"<FBDialogDelegate>.didFailWithError: %@", dialog);
  45.  
  46. }
  47.        
  48. #import "MyAppModelClass.h"
  49.  
  50. - (void) aMethod;
  51.        
  52. #import "MyViewCntrl.h"
  53.  
  54.  
  55. - (void) aMethod {
  56. NSMutableDictionary* myParameters = [[NSMutableDictionary alloc];
  57.           initWithObjectsAndKeys: @"1234567", @"app_id",  
  58.                                     @"touch", @"display",
  59.      @"http://myWebSite.de/pics/AppIcon.jpg", @"picture",
  60.                       @"http://myWebSite.de", @"link",  
  61.                          @"It's my web site", @"caption",
  62.                @"Visit my personal web site", @"description",
  63.                                     @"false", @"show_error", nil];
  64.  
  65. [ptrMyAppModelClass facebook] dialog: @"feed"
  66.                            andParams: myParameters
  67.                          andDelegate: ptrMyAppModelClass];
  68. }
RAW Paste Data
Top