How to share link of an video to my facebook account and twitter account..
-
wrote on 29 Apr 2011, 04:45 last edited by
hello friends
Actually i want to share the link of an video to my facebook account/twitter account by clicking on the button present in my mobile app..means suppose i have an live video in my app..now there is an buttons for both facbook and twitter..when i can click these button than the link of the video is shared to either of my account ...so hw this can be done..plz suggest
with regards
Anshuman -
wrote on 29 Apr 2011, 06:33 last edited by
Hi Anshuman,
There are plenty of articles about social networks in Forum Nokia. Some of them may help you:
http://wiki.forum.nokia.com/index.php/Facebook_Connect
http://wiki.forum.nokia.com/index.php/QML_OAuth
http://wiki.forum.nokia.com/index.php/KQOAuth_–_Easy_and_Powerful_OAuth_library_for_QtCheers,
Leon -
wrote on 4 May 2011, 11:32 last edited by
Edit: merged this message, that was posted as a separate thread, into this topic; Andre
hello friends,I am working on app where i have to post the video link to facebook,so i have used the postfeed project for facebook which is present in git repository,my link appears in the below way
http://xyz.abc.com.aspx?streamid=223322&id=1400...
now it accepts till http://xyz.abc.com.aspx?streamid=223322
and i can post the link till here,but as soon as i add the later part ie&id=1400,its not posting it,so what is the problem with that "&",please help me out..regards
anshuman -
wrote on 4 May 2011, 12:01 last edited by
Try to play with
"QUrl::toPercentEncoding() ":http://doc.qt.nokia.com/4.7/qurl.html#toPercentEncoding and "QUrl::fromPercentEncoding() ":http://doc.qt.nokia.com/4.7/qurl.html#fromPercentEncoding -
wrote on 4 May 2011, 12:21 last edited by
the code i have written is like this..u please check where i have done mistake..and where i use toPercentEncoding() function
@void Video::shareOnFacebook()
{PostFeed *pPostFeed=new PostFeed;
QUrl url;
url.setUrl("http://xyz.abc.com.aspx?");url.addQueryItem("streamid", video.url);
url.addQueryItem("id","1400");
url.addQueryItem("type","video-mp4");//mp4
url.addQueryItem("redirect","false");pPostFeed->setPostText(url.toString());
pPostFeed->showFullScreen();}@
-
wrote on 4 May 2011, 12:33 last edited by
Any links to that postfeed project?
-
wrote on 4 May 2011, 12:41 last edited by
can u please elobrate me..becoz here the url that i have to pass is in QString and in toPercentEncoding() its needs Qstring,Qbyte,Qbyte as arguments so can u give an example of how that can be done..i hv seen qt doc but i dont understand how to implement it in my code..please suggest me...
-
wrote on 4 May 2011, 13:46 last edited by
Did you read and understand my comment?
Do you mind writing correct english here, please. This is Qt Developer Network, not Facebook. I'm so tired of reading your g33ky l337 two-letter teenie writings. You and your well known colleague have been told so many times.
-
wrote on 5 May 2011, 10:11 last edited by
actually i tried this code..
@QUrl url;
url.setUrl("http://xyz.abc.com.aspx?");url.addQueryItem("streamid", video.url);
url.addQueryItem("&id","1400");
url.addQueryItem("&type","video-mp4");@
now link is share to facebook but only thing is that it only takes the link before "&" means if i pass
http://xyz.abc.com.aspx?streamid=643646&id=1900 then it share uptohttp://xyz.abc.com.aspx?streamid=643646..so hw can i resolve this..
-
wrote on 5 May 2011, 10:21 last edited by
Hi Borah,
this code:
@
Dialog::Dialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog)
{
ui->setupUi(this);QUrl url; url.setUrl("http://xyz.abc.com.aspx?"); url.addQueryItem("streamid", "643646"); url.addQueryItem("&id","1400"); url.addQueryItem("&type","video-mp4"); ui->m_pLabel->setText(url.toString());
}
@leads to this string in the label:
@
http://xyz.abc.com.aspx?streamid=643646&&id=1400&&type=video-mp4
@so it seams as the problem lies somewhere else...
As I see double & characters there, your parameters are perhaps wrong? -
wrote on 5 May 2011, 10:33 last edited by
hello Gerolf
Actually my work is to remove & from my url..intially when i write..url.addQueryItem("id", "3646"); then single "&" arises in the link..how can i replace "&"..i know it can encode it with % but how can i use it in code i dont understand..please suggest me..
with regards
Anshuman -
wrote on 5 May 2011, 12:03 last edited by
Sorry, I did not understand.
Please write you input string wand how it should look like as examples.
like:@
http://xyz.abc.com.aspx?streamid=643646&id=1400&type=video-mp4
@should become
@
http://xyz.abc.com.aspx?streamid=643646%id=1400%type=video-mp4
@ -
wrote on 5 May 2011, 12:16 last edited by
yeh..thats what i want..so how that can be done.can u please suggest me.
with regards
Anshuman Borah -
wrote on 5 May 2011, 12:17 last edited by
Use
@
QString sz = url.toString();
sz.replace(...);
@or look at the docu of QUrl:
- "void QUrl::setQueryDelimiters ( char valueDelimiter, char pairDelimiter )":http://doc.qt.nokia.com/4.7/qurl.html#setQueryDelimiters
-
wrote on 5 May 2011, 15:37 last edited by
Borah,
why so complicated? Is it so hard for you to just write:
This is what I have: abcdef
This is what I want: xyzklmNobody understands your explanations - do you?
-
wrote on 6 May 2011, 11:32 last edited by
hello Gerolf
Thanks for your suggestion..its working
with regards
Anshuman
2/16