1
直到昨天我能够执行以下代码来分享用户的谷歌+个人资料,但突然今天它在控制台日志中说,[GPPShareBuilderImpl getURL] |setURLToShare:| must be called for call-to-action to work
。
代码:
“setURLToShare”必须呼吁号召行动
[GPPShare sharedInstance].delegate = self;
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:@"AppName"
description:@"App description."
thumbnailURL:[NSURL URLWithString:@"https://www.example.com/image.png"]];
/* This line passes the deepLinkID to our application
if somebody opens the link on a supported mobile device */
[shareBuilder setContentDeepLinkID:@"post"];
// set the text of post. user can edit this before sharing.
[shareBuilder setPrefillText:@"I just created a trip from XYZ app."];
// This will create a call-to-action button with the specified label.
// - URL specifies where people will go if they click the button on a platform
// that doesn't support deep linking.
// - deepLinkID specifies the deep-link identifier that is passed to your native
// application on platforms that do support deep linking
[shareBuilder setCallToActionButtonWithLabel:@"Install"
URL:[NSURL URLWithString:@"http://www.example.com/"]
deepLinkID:@"install"];
[shareBuilder open];
根据Google+ documentation(Share without URL
部分)我可以使用下面方法来代替setURLToShare:
。这种方法一直工作到昨天。
[shareBuilder setTitle:@"title"
description:@"description";
thumbnailURL:@"url"];
我还没有在Google+上找到与此相关的内容。我试着删除应用程序并重新安装。任何想法该怎么办?
这怎么可能?我可以在问题出现的前一天使用交互式帖子。即使我可以发布帖子的屏幕截图,如果你只是想看看。 – Geek
一旦我开始出现这个问题,不会发布'description',而发布'title'和'thumbnailURL'。 – Geek
在iOS框架中存在一个错误,它没有通知错误,现在已经修复。 – Silvano