使用Google+ Platform for iOS設置應用程序以在Safari中打開共享網頁後按「共享」或「取消」按鈕導致錯誤消息,並永不返回到我的應用程序。ios上的Google Plus共享指向共享和取消按鈕中的鏈接中斷鏈接的網頁
要查看屏幕圖像看這個鏈接:screen images
按下分享按鈕併發布一條消息給谷歌加上帳戶,但沒有返回到啓動它的應用程序。非常感謝獲取共享過程返回到我的應用程序的任何幫助。
我的視圖控制器頭文件:
#import "UIKit/UIKit.h"
#import "GooglePlus/GooglePlus.h"
#import "GoogleOpenSource/GoogleOpenSource.h"
@interface TViewController : UIViewController <GPPShareDelegate>
- (IBAction)buttonClick:(id)sender;
@end
我的視圖控制器的.m與谷歌的客戶端ID文件x'ed出來:
#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
感謝所有指令。需要做「第4步。添加URL類型」。 – smDeveloper
@smDeveloper沒問題:) –