cancel
Showing results for 
Search instead for 
Did you mean: 

sap jam open soical gadget and posting a blog with hashtag on users behalf

Former Member
0 Kudos

Hi I am new to sap jam and I am looking at the docs several docs. I had suggested a solution for which I am unsure. But we need to go ahead developing that now. without any POC.

I would like a open soical gadget and users to create image I want that the users who create this image be posted as a blog entry on users behalf automatically. now I understand that I need to user oData and oAuth. But can someone please confirm if this solution that I have suggest is possible we would be using php, Do you think we can work towards this. we need to get something out in December.

I am not worried so much about the gadget but I am worried about the post on users behalf. Please let me know if such a thing is possible and that we will find out answers.

If this is not the right palce to ask ask for support do let me know where I can post my questions.

thanks and regards,

shammi seth

shammis@tatainteractive.com

Former Member
0 Kudos

thanks. Can I post a content item using jam gadget JavaScript API without oAuth?

Former Member
0 Kudos

Thanks Adam,

Is there any sample/Document available to post data from Widget on behalf of logged in user?

Accepted Solutions (1)

Accepted Solutions (1)

Adam_Stone
Active Contributor
0 Kudos

If you are using OpenSocial, you can do a makerequest to the Jam api, which is part of the javascript api, which should use the currently logged in user's credential. In order to have an image in a blog, you would create the blog as html and link to the image (you could upload the image to Jam, and get the link from that). As for tags, with the 1611 release which just was deployed on preview systems, you can do a PATCH on ContentItems and set the Tags property.

Former Member
0 Kudos

Hi Adam thanks for you help, I am able to understand what makerequest function is, to call the Jam OData API is however i am facing another issue. when i call oAuth API within the opensocial gadget i get an error

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://fvpkgav5pfl1k2695pok2qn1r7dsc8ea-locked.gadgets-jam4.sapjam.com') does not match the recipient window's origin ('https://hcm4preview.sapsf.com'). However if i open the external application in a new window i get the access token after the i click allow button on Authorize access to your account prompt. The same does not work within the gadget and i am redirected to the jam landing page within the widget. its not redirecting to the call backurl.

I would like to do this step within the gadget only. Its not letting me. I can show you an example on my sapam developer account. Can you please advice.

Answers (0)