Google Plus从iphone分享
我需要将我iPhone应用中的用户帖子分享到Google +。我做了Facebook和Twitter分享。Google Plus从iphone分享
谷歌+是否有API?有没有人有任何例子?
这里是加链接,谷歌的API: https://developers.google.com/+/api/
&这里是其中u可以找到共享在谷歌加 http://code.google.com/p/google-api-objectivec-client/wiki/Introduction
现在他们没有任何API我想他们很快就会介绍我希望能帮到你。 但现在不行。
This似乎不是正确的答案。你必须已经添加它作为评论 –
帮助您使用Google+分享链接的链接: https://developers.google.com/+/plugins/share/#sharelink
“共享链接适用于本地客户端应用程序...和 其他人可能无法使用+1或分享按钮”
的分享对谷歌的职位最简单的方法是加首先包括在Xcode其GPPShare.h文件,然后用GPPShareDelegate 延长.h文件然后在IBAction为方法
id<GPPShareBuilder> shareBuilder = [[GPPShare sharedInstance] shareDialog];
// This line will manually fill out the title, description, and thumbnail of the
// item you're sharing.
[shareBuilder setTitle:@"Share" description:@"sharing" thumbnailURL:[NSURL URLWithString:@"http://25.media.tumblr.com/tumblr_m9p3n1vJmZ1rexr16o1_400.jpg"]];
[shareBuilder setContentDeepLinkID:@"rest=1234567"];
[shareBuilder open];
写这个代码,同时也实现GPPShareDelegate方法,它是有帮助的,以检测成功共享
- (void)finishedSharing:(BOOL)shared
{ if (shared) {
NSLog(@"User successfully shared!");
} else {
NSLog(@"User didn't share.");
}
当我实现这种方法..我有一个控制台输出,我必须先登录。我怎样才能做到这一点 – Dalvik
对于雨燕3.0
import SafariServices
然后在共享按钮添加以下代码委托
<SFSafariViewControllerDelegate>
使用本
var urlComponents = URLComponents(string:"https://plus.google.com/share")
let queryItem = URLQueryItem(name: "url", value: "https://myexamplepagetoshare.com")
urlComponents?.queryItems = [queryItem]
let url = urlComponents?.url
let safariVC = SFSafariViewController(url: url!)
safariVC.delegate = self
self.present(safariVC, animated: true, completion: nil)
这是一个简单的G +份额现已上市。
[Google plus api for posting on wall like facebook](http://stackoverflow.com/questions/7857812/google-plus-api-for-posting-on-wall-like-facebook) –