javascript - Twitter intent redirect to mobile.twitter.com -
i working on project able share via twitter or facebook.
when working twitter share, found out twitter intent best way. found problem when try share via twitter using mobile device.
here sample code:
var width = 640, height = 440, left = ($(window).width() - width) / 2, top = ($(window).height() - height) / 2, url = 'https://twitter.com/intent/tweet?text=congrats!&hashtags=labmate!', opts = 'status=1' + ',width=' + width + ',height=' + height + ',top=' + top + ',left=' + left; window.open(url, 'twitter', opts);
if user login, nothing wrong, when user not login twitter show login form, , if user misstype either username or password, twitter redirect page.
here problem, after twitter redirect page, url change into
https://mobile.twitter.com/login/error?username_or_email=sample%40mail.com&redirect_after_login=%2fintent%2ftweet%3ftext%3dcongrats.......
when user login right username , password, twitter redirect to
https://mobile.twitter.com/intent/tweet?text=congrats
which doesn't exist
what can do? appreciate.
Comments
Post a Comment