iphone - How to autoshare on facebook and twitter in ios 6? -


I am using Facebook and Twitter share in my application, here I share the default link and text without showing the share window I want to do it, I tried many ways but still I could not get the solution.

This is my code:

  NSString * str_face = [NSString stringWithFormat: @ "Another instance is now from DelNabit, now it's yours"]; SLComposeViewController * facebookPostVC = [SLComposeViewController Compose ViewControllerForServiceType: SLServiceTypeFacebook]; [FacebookPostVC addImage: [UIImage imageNamed: @ "Default.png"]]; [FacebookPastVC set fiscal text: Strauss]; [Self-present ViewController: Animated facebookPostVC: Yes Completed: Zero]; 1.For using Facebook's account framework and social framework without dialogue, click the < / P> 
  - (zero) post {ACAccountStore * accountStore = [[ACAccountStore Alok] init]; ACAccountType * facebookAccountType = [ACCAccountTypeIdentifier: [ACAccountTypeIdentifierFacebook] with the self.accountStore account type; // Specify Api ID and Permission NSDictionary * options = @ {ACFacebookAppIdKey: @ "My App ID", AC FeeBook Advertising: @ [@ "publish_stream", @ "published_creations"], acfacebookindexa: acceptsbooksFriends}; [AccountStore requestsAssetTexXtype: FacebookAquintType option: Options complete: ^ (Bulled NSIRR * E) {if (given) {NSARRA * Accounts = [SARdets store accounts with ACCITY type: Facebook account type]; FacebookAccount = [accounts lastObject]; } Else {// handle fail}}]; NSDictionary * parameter = @ {@ "message": @ "test post"}; NSURL * feedURL = [NSURL URLWithString: @ "https://graph.facebook.com/me/feed"]; SLRequest * feedRequest = [SLRequest request FORServiceType: SLServiceTypeFacebook request method: SLRequestMethodPOST url: feedURL parameters: parameter]; FeedRequest.account = self.facebookAccount; [FeedRequest performRequestWithHandler: ^ (NSDT * feedbackdata, NSHTPRRSpons * urlResponse, NSError * error) {// handle response}];   
  1. Twitter post IOS6 without

      - (zero) posttofeter {ACAccountStore * account = [[ACAccountStore alloc] init]; AC Account Type * Account Type = [Account Account Type with Identity Identifier: ACActutAttip Identifier]; [ACCAccessToAccountsWithType: accountType option: Zero full: ^ (BOOL sanctioned, NSError * error) {If (given === Yes) {NSArray * arrayOfAccounts = [ACCOUNTType: accountType] with account accounts; If ([arrayOfAccounts count]> 0) {ACAccount * twitterAccount = [arrayOfAccounts lastObject]; NSDictionary * message = @ {@ "status": @ single ???? Test Twitter Post from iOS 6A ?????}; NSURL * requestURL = [NSURL URLWithString: @ "http://api.twitter.com/1/statuses/update.json"]; SLRequest * postRequest = [SLRequest requestForServiceType: SLServiceTypeTwitter request method: SLRequestMethodPOST url: requestURL parameter: message]; }}]; }}      

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -