문제

I am porting my webapp to a native app thanks to Phonegap. Everything works great but Addthis (it seems to be a problem with file references since I get a "URL not found on this server" error but I could not solve it and scripts are loaded on the fly from Addthis servers anyway).

I read here that Sharethis would not work without resorting to some Objective-C coding either.

Is there a simple way (i.e. without any Objective-C knowledge) to have a social media plugin with some advanced features (like counters) work with Phonegap?

If no, I will resort to a simple jQuery plugin instead...

Thanks a lot for your help

도움이 되었습니까?

해결책

What content are you expecting people to like ? If its a page internal to the app then they won't be able to like an internal local URL. If you want them to 'like or share' your app you will need to create a Facebook app page or look at adding Facebook plugin to post to peoples wall.

다른 팁

There is a problem with the script that the Add This Plugin generates. I got round this by copying the javascript locally and changing the variable _atr to be http//s7.addthis.com/

http://support.addthis.com/customer/portal/questions/375961-integrate-addthis-in-an-app-with-phonegap

I overcame that issue by creating the following module - https://www.npmjs.com/package/cordova-network-interceptor which intercepts and fixes bad network requests caused by relative protocol used in scripts like the one addthis uses. Hope that helps!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top