GPPShareBuilder is not setting "PrefillText" while creating a post from iOS Application

StackOverflow https://stackoverflow.com/questions/21404344

Вопрос

I am trying to make a post to g+ from iOS Application using google SDK. I am working with the following lines of code, everything is working but PreText is not setting.

    id <GPPShareBuilder> shareBuilder = [[GPPShare sharedInstance] shareDialog];

    [shareBuilder setPrefillText:prefilText];
    [shareBuilder setURLToShare:[NSURL URLWithString:@"http://placekitten.com/500/400"]];
    [shareBuilder open];
Это было полезно?

Решение

Hi I had this problem too and I solved that by using native share, if the user doesn't have permission you can tell the app to ask to Google+ for permission.

I used this library which do this for you, but you can read the code and customise it.

https://github.com/lysannschlegel/GooglePlusShareActivity

I hope it helps you.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top