logo
down
shadow

session.state FBSessionStateCreated is not posting on fb wall in ios


session.state FBSessionStateCreated is not posting on fb wall in ios

By : Fábio Luis Reway
Date : November 18 2020, 03:49 PM
I hope this helps you . I got the sollution. No need to check the session if we are logged in with facebook account.. Just post what u want
code :
FBSession *session = [[FBSession alloc] init];

NSLog(@"FBSESSION %@", session);

if (session.state == FBSessionStateCreatedTokenLoaded || session.state == FBSessionStateOpen )
{

    [[[[iToast makeText:@"Post on wall success"] setGravity:iToastGravityBottom] setDuration:iToastDurationShort]show];
    // even though we had a cached token, we need to login to make the session usable
    [session openWithCompletionHandler:^(FBSession *session,
                                         FBSessionState status,
                                         NSError *error) {
        [FBSession setActiveSession:session];
        [FBRequestConnection startWithGraphPath:@"/me/feed"
                                     parameters:params
                                     HTTPMethod:@"POST"
                              completionHandler:^(FBRequestConnection *connection, id result, NSError *error){
                                  NSLog(@"error-- %@",error);
                              }];
    }];
}
else
{

[[[[iToast makeText:@"Post on wall success"] setGravity:iToastGravityBottom] setDuration:iToastDurationShort]show];
[FBRequestConnection startWithGraphPath:@"/me/feed"
                             parameters:params
                             HTTPMethod:@"POST"
                      completionHandler:^(FBRequestConnection *connection, id result, NSError *error){
                          NSLog(@"error-- %@",error);
                      }];
}


Share : facebook icon twitter icon
Posting to my wall instead of others wall FBML Facebook API

Posting to my wall instead of others wall FBML Facebook API


By : coreyauger
Date : March 29 2020, 07:55 AM
will help you Yeah, you aren't using the right method signature. Here it is as copied from my copy of the file
code :
  public function stream_publish(
    $message, $attachment = null, $action_links = null, $target_id = null,
    $uid = null) {
$facebook->api_client->stream_publish( $message, null, null, $target_id ); 
Which Facebook permissions allow for posting to a page wall (not profile wall)?

Which Facebook permissions allow for posting to a page wall (not profile wall)?


By : user2540703
Date : March 29 2020, 07:55 AM
this will help here's what you do. First, read the documentation on extended permissions. Notice that 'manage_pages' says:
code :
https://graph.facebook.com/$USERID/accounts?access_token=$USER_ACCESS_TOKEN
https://graph.facebook.com/$PAGEID/feed
FB Graph API wall posting

FB Graph API wall posting


By : Parth Dodiya
Date : March 29 2020, 07:55 AM
it helps some times You can not specify multiple ID in that field. When you think that how easy it is to spam, it makes sense. if you want to post on multiple users friend, try graph api:
code :
$user_ids = new Array(); //array of user ids;
for($i = 0; $i<$total_ids; $i++)
{  
$result = $facebook->api('/'.$user_ids[$i].'/feed', 'post', array(
    'message' => $status,
    'picture' => $picture,
    'link' => $link,
    'name' => $name,
    'caption' => $caption,
    'description' => $desc,
));
}
Posting on facebook wall with sdk 3.0

Posting on facebook wall with sdk 3.0


By : pavitra83
Date : March 29 2020, 07:55 AM
will help you Everything looks right except the graphPath parameter in your Request method. Instead of:
"/" + pickedUsersId.get(0) + "/feed"
Facebook Posting on page's wall instead of user's wall

Facebook Posting on page's wall instead of user's wall


By : Akila
Date : March 29 2020, 07:55 AM
will be helpful for those in need Do it like this. It will work. Replace pageID with your own pageID at which u want to post.
code :
NSMutableDictionary *variablesForEvent=[NSMutableDictionary dictionaryWithCapacity:1];
[variablesForEvent setObject:@"my message" forKey:@"message"];
NSString *postToFBEventRequest = [NSString stringWithFormat:@"%@/feed",@"pageID"];
    [FBRequestConnection startWithGraphPath:postToFBEventRequest
                                 parameters:variablesForEvent
                                 HTTPMethod:@"POST"
                          completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
                          }];
Related Posts Related Posts :
  • Programmatically set size of UIView from Storyboard
  • Navigation bar blink
  • Web services issue on POST method
  • Parse.com error 'Method not allowed when Pinning is enabled.' when I use a PFQueryTableViewController subclass
  • Swift can't send URLRequest at all?
  • No Provisiong profiles with a valid signing identity were found and Failed to locate or generate matching signing assets
  • iOS: how to set httponly flag for NSHTTPCookie
  • How to get the mac address of a beacon in objective-c without knowing its UUID, major and minor values?
  • tableView is not showing data from JSON in swift
  • iTunes reject app for date of birth
  • SWIFT reporting "Extra argument in call" - works in Playground
  • save data depending on passed value in swift
  • webview not showing on full Screen of iphone 6
  • Location Notification's based on Latest iOS Feature
  • Adjusting Height of UITableViewCell
  • How to show five digit unicode in iphone
  • unwind doesn't work
  • Confusion about coordinates, frames & child nodes in SpriteKit on iOS?
  • If Statements not being recognized by Xcode
  • readonly property in RubyMotion
  • 'No available types for source 1' when the app runs on my device(IPhone 6) swift
  • IOS:Remove view when clicked in background
  • Removing "\" from URL in iOS Swift
  • iOS - Send an email automatically (NOT from user's account)
  • The usage of NSNotificationCenter in the relationship of parent and children
  • When do Apple auto-renewable subscriptions renew?
  • Unknown large spacing between x-axis label and base of plot in core-plot
  • How do I change the displayed time format after NSTimer is initiated?
  • Swift JSON breaks when [ ] are used
  • Secure Memory For Swift Objects
  • didSelectItemAtIndexPath doesn't work normally
  • Swift Documentation Comments
  • Is there a simple way to assign a value only once(first time) inside a loop/repeatedly running method?
  • Play sound in while app in background
  • If I have an embedded unrestricted webview, does that mean I have third-party content?
  • UITapGestureRecognizer on UIScrollView
  • App does not respond to hardware volume changes on iPad
  • troubleshoot asp.net web app on iOS
  • What size should my tab bar item icons be?
  • Parse.com Facebook authorize never calls completion handler
  • Implementing iAds on a SceneKit view
  • UIAccessibility and Apple Pay voice-over interaction issue
  • Getting objectForKeyedSubscript unrecognized selector when parsing data in table view
  • Execute action when back bar button of UINavigationController is pressed
  • iOS Table View - Set tag on cell or label?
  • Preferred approach for changing UITableViewCell content based on cell width
  • NSDateformatter dateFromString AnyObject
  • Type specifier for NSMutableArray?
  • iOS7 slideout drawer draggable bug
  • Fetch Core Data entity with a filtered set of child elements based on a property
  • UILabel AutoResize Swift
  • Swift - Selecting cells when having multiple custom cell-classes
  • Table View Cell Prototype from Storyboard not initializing subviews
  • Best way to implement view like map
  • Adding a tap gesture to a UIImageView to change a UILabel?
  • Minimum OS X and xcode requirements for ios 8.1 development
  • Changing the text of the Cancel button in the default TouchID dialog
  • iOS timing between taps
  • Swift: How do I link an action to a view inside of a tableViewCell?
  • Value for frame.size.height is always the same regardless of height of view
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org