Skip to Content
0

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

Nov 02, 2016 at 08:38 AM

135

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
Former Member

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

0
Former Member

Thanks Adam,

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

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Adam Stone
Nov 09, 2016 at 09:56 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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.

0