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