Facebook Sharing Window Issue - iphone

I am using Sharekit for Facebook sharing on my iPhone app. I had used used the following code for setting the app icon in the sharing window. It works fine except during first time login to Facebook.
NSURL *url = [NSURL URLWithString:#"http://google.com"];
shareScore_ = [SHKItem URL:url title:[NSString stringWithFormat:#"Share Message" contentType:SHKURLContentTypeUndefined];
shareScore_.facebookURLSharePictureURI = #"http://edibleapple.com/wp-content/uploads/2009/04/apple_rainbow_logo.jpeg";
[SHKFacebook shareItem:shareScore_];
During first time login it displays the image in http://google.com and if the user is already logged in it displays the correct image in icon_url. Is there any solution for this?
First Time Login ScreenShot:
Already Logged In Screenshot:

It was a bug in ShareKit - it is fixed now. Please update.

Related

Google plus share opens link in browser

I am just trying to implement an iPhone app, that has a feature to share on Google+. So, when I click on share button, it is opening the link in safari. Instead, I would like to have it like Facebook pop-up window. Is there any possibility to implement it?
- (IBAction) didTapShare: (id)sender {
share = [[[GooglePlusShare alloc] initWithClientID:kClientID] autorelease];
/* share.delegate = self; // optional
appDelegate.share = share; //optional*/
[[[[share shareDialog] setURLToShare:[NSURL URLWithString:#"URL_TO_SHARE"]] setPrefillText:descStr] open];
[[share shareDialog] open];
}
This is the code, I’ve used for sharing. And I look up on the GooglePlusShare class, I couldn’t figure out anything possible. Thanks in advance!
I think , right now , this is the preffered way to post on google plus..And
After all. after posting status on google plus..it also comes back to your app..

share text on facebook from iOS application using sharekit

I want to share some text on facebook using sharekit. I found many solutions but no1 worked for me.
I have imported sharekit and frameworks in my project. Now I want to share text: #"Hello everyone" directly (I mean not to choose from options: mail, twitter, facebook. When I press button share it should share text on facebook, of couse ask log in if it's necessary).
And also I will be glad if you tell me which fields are necessary to fill in the SHKConfig.h file for facebook.
In DefaultSHKConfigurator.m replace the defaultFavoriteTextSharers method with the below Code
- (NSArray*)defaultFavoriteTextSharers {
return [NSArray arrayWithObjects:#"SHKFacebook", nil];
}
Sharing Text
+ (SHKItem *)text:(NSString *)text;
//text - The text you want to share
NSString *someText = #"This is a blurb of text I highlighted from a document.";
SHKItem *item = [SHKItem text:someText];
You can download the ShareKit source files and just watch the ShareKit official project overview video here
You can read the ShareKit documentation here

iPhone - Facebook issue with ShareKit

I am using the below code to integrate facebook sharing in my iPhone App. It works fine most of the time. But some times instead of showing a login window , it displays a blank window and nothing is displayed in that. So user fails to share it on Facebook. I don't know whats going wrong !!
NSURL *url = [NSURL URLWithString:#"http://www.socialdealspot.com"];
SHKItem *item = [SHKItem URL:url title:deal.title];
item.image = [UIImage imageNamed:#"Icon.PNG"];
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
// Display the action sheet
[actionSheet showFromToolbar:self.navigationController.toolbar];
Has anyone faced this issue before or I am doing something wrong .Please help me !!
I am able to post the first time I logs in. After wards when I try to share something it just displays a blank screen . . . ? Can Any body please look into this . . ??
Thank You !!
This happened to me with Sharekit for about 5 hours on July 3. I chose to wait it out and it fixed itself. Must have been a serverside issue maybe?

iOS ShareKit, twitter logout? facebook status empty?

I am using ShareKit plugin for iPhone to enable social sharing for the application I'm working on. I set up everything, I stripped it to have Facebook and Twitter services only, connected successfully to both and now I have 1 problem in each of the services...
The problem with Twitter is how to logout/signout...
ShareKit sends the text and the url to Twitter's publish box. It is saving status perfectly. The question is where to put "logout" button for twitter? I want the iPhone user to logout in order to change username. This is done by calling the method
[SHKTwitter logout];.
Now, the problem is where to put the button that will fire this method? In navigationToolbar of Twitter actionSheet I already have 2 buttons and the toolbar (bottom one) is covered by the keyboard?
[EDIT]: I solved this issue by modifying the twitter action sheet. I resized the textView and then added UIToolbar and changed its position so that it fits into the gap between the keyboard and textView. Into the toolbar I added one button with an action that calls a logoutTwitter method
Facebook problem is more of a mystery...
So, in my sharreKitButtonHandler I have the following code:
NSURL *url = [NSURL URLWithString:#"http://www.domain.com"];
SHKItem *shareItem = [SHKItem URL:url title:self.itemTitle.text];
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:shareItem];
[actionSheet showFromToolbar:self.shareKitToolbar];
This code prepares some ivars of a shareItem object and in the case of Twitter shareKit manages to fill the status box so that user just needs to press publish and its done...
In the case of Facebook it is not working. FB dialog pops out and the share box is empty saying "What's on your mind?" The url and the title are not put into the publish form?
So, please if you have any clue what's going on in the latter problem or how to solve the former problem, I would really appreciate your help...
It takes five lines to add twitter. I wouldn't bother with Sharekit for that.
TWTweetComposeViewController *tweetView = [[TWTweetComposeViewController alloc] init];
[tweetView addImage:imageToShare;
[tweetView addURL:URLToShare];
[tweetView setInitialText:messageToShare];
[senderViewController presentViewController:tweetView animated:YES completion:nil];
I wanted to use sharekit for my projects, but it was difficult to use and after a week I gave up as I couldn't share more than one thing at the same time (URL, Image, Message, etc.) which is pretty useless if you want to promote your app.
Facebook is more difficult, probably a 100 lines. It took me 3-4 days to implement. It will be integrated in iOS 6 just like Twitter :)

Launch Safari from iPhone App

I know that i can use the following code to launch my own url, but i want the user to continue their workflow after using my bookmarklet so therefore don't want to open a new tab and have them re-load the url i put into the url variable?
NSURL url* = [NSURL URLWithString:#"http://google.com"];
[[UIApplication sharedApplication] openUrl:""];
Can this be done?
There is no way to open Safari without actually quitting your app and opening Safari. Or to somehow automatically return the user to your app from Safari once the URL you opened loads.
Or am I misunderstanding the question?
Actually, you can delegate a URL handler to your app. A smart example is shown here:
http://www.mobileorchard.com/lite-to-paid-iphone-application-data-migrations-with-custom-url-handlers/
The scenario is:
- register URL handler
- open Safari as normal
- get Safari to use your custom URL handler that should open your app (eg: myapp://)
Have a look at the way Flickr iPhone app does the authentication.
Can you use 'about:blank' as the url? That should just open Safari with a blank page. I assume this would be similar to tapping the 'number' button in the bottom right then selecting 'new page'.