ios上的Google Plus共享将指向共享和取消按钮中链接已断开的网页
设置应用程序以使用Google+Platform for iOS进行共享,但在Safari中打开共享网页后,按“共享”或“取消”按钮将显示错误消息,并且永远不会返回到我的应用程序 要查看屏幕图像,请查看此链接: 按下共享按钮确实会向google plus帐户发送消息,但不会返回启动它的应用程序。非常感谢您为我的应用程序返回共享过程提供的任何帮助 我的视图控制器头文件:ios上的Google Plus共享将指向共享和取消按钮中链接已断开的网页,ios,google-plus,Ios,Google Plus,设置应用程序以使用Google+Platform for iOS进行共享,但在Safari中打开共享网页后,按“共享”或“取消”按钮将显示错误消息,并且永远不会返回到我的应用程序 要查看屏幕图像,请查看此链接: 按下共享按钮确实会向google plus帐户发送消息,但不会返回启动它的应用程序。非常感谢您为我的应用程序返回共享过程提供的任何帮助 我的视图控制器头文件: #import "UIKit/UIKit.h" #import "GooglePlus/GooglePlus.h" #impor
#import "UIKit/UIKit.h"
#import "GooglePlus/GooglePlus.h"
#import "GoogleOpenSource/GoogleOpenSource.h"
@interface TViewController : UIViewController <GPPShareDelegate>
- (IBAction)buttonClick:(id)sender;
@end
#导入“UIKit/UIKit.h”
#导入“GooglePlus/GooglePlus.h”
#导入“GoogleOpenSource/GoogleOpenSource.h”
@界面TViewController:UIViewController
-(iAction)按钮单击:(id)发件人;
@结束
google客户端id为x'ed的My View Controller.m文件:
#import "TViewController.h"
@interface TViewController ()
@end
@implementation TViewController
- (IBAction)buttonClick:(id)sender {
[GPPSignIn sharedInstance].clientID = @"xxxxxxxxxxx.apps.googleusercontent.com";
id<GPPShareBuilder> shareBuilder = [[GPPShare sharedInstance] shareDialog];
[shareBuilder open]; // opens share page in Safari
}
- (void)finishedSharing: (BOOL)shared { // This event never fires
if (shared) {
NSLog(@"User successfully shared!");
} else {
NSLog(@"User didn't share.");
}
}
@end
#导入“TViewController.h”
@接口TViewController()
@结束
@TViewController的实现
-(iAction)按钮单击:(id)发件人{
[GPPSignIn sharedInstance].clientID=@“xxxxxxxxxx.apps.googleusercontent.com”;
id shareBuilder=[[GPPShare sharedInstance]shareDialog];
[shareBuilder open];//在Safari中打开共享页面
}
-(void)finishedSharing:(BOOL)shared{//此事件从不激发
如果(共享){
NSLog(@“用户已成功共享!”);
}否则{
NSLog(@“用户未共享”);
}
}
@结束
您的google plus api设置一定有问题。Google Plus正试图使用类似youd的URL方案重新打开你的应用程序efinethis://somethingtodoinyourapp
如果您已将google plus设置为使用特定的url方案重新打开应用程序,则需要在“信息->url类型”下的项目设置中定义相同的方案
这是一个很难解决的问题,因为您无法在不危及您隐私的情况下向我们提供信息
您完成这里列出的所有说明了吗?:谢谢您为我指明了正确的方向。需要执行“步骤4.添加URL类型”。@smDeveloper没问题:)