Kapil
Kapil

Reputation: 108

unable to share url with image in google+ in ios app

I am working on an app in which I am trying to share an image with a url via google+. I am using GPPNativeShareBuilder for the same. But its not sharing anything and giving following warning "You cannot attach a link and media to a post at the same time."

Same is mentioned in method description on google forum as

Please suggest me any solution to resolve this problem.

Upvotes: 2

Views: 688

Answers (1)

Dilip Manek
Dilip Manek

Reputation: 9143

We can not allowed to add image and link same time in the post,
But we can add "meta" in link, Have to add "meta" in the header of the Link page,
And define image in this "meta".

Google use Open Graph (og) meta as Facebook, Here is the sample meta,

<meta property="og:site_name" content="Your Site Name" />
<meta property="og:title" content="Title of the Post" />
<meta property="og:description" content="Description for the post" />
<meta property="og:url" content="URL where you want to redirect on web" />
<meta property="og:image" content="Your image URL" />

Here is the Some Sample site that is good example
http://moz.com/blog/meta-data-templates-123
http://www.bruceclay.com/blog/how-to-use-social-meta-tags/

Upvotes: 1

Related Questions