Share on User's Wall using Facebook SDK

Apps are really getting into the "sharing" thingy. I am unsure why many developers hate to use the ACTION_SEND. Instead, they like to go into the hassle of integrating facebook into their app using the always-changing sdk facebook's offering.

I know many of you want to set the "picture" / "name" and other parameters of the facebook share, and, therefore, the normal ACTION_SEND is not adequate. If it were to me, I would force you all to use the ACTION_SEND.
Since it is not:

Here is what I consider the right way of using the Facebook SDK for the purpose of sharing. Here, I present the user with a sharing dialog so that he can add his own message to the share. I think that's the whole point of social media: user engagement. If you want auto-share, that is pretty simple and I do not feel like posting about it.

Ok. There are dozens of tutorials out there that will help you in implementing Facebook login. You will end up with a Session object that will return true if you call the isOpened function upon it.

In the following code, I used mContext and mySession: mContext is the context which is usually the activity where you want to share - mySession is the Facebook Session object which you would probably get by calling Session.getActiveSession(); or it could be handed to you in the StatusCallback when you login

Here is how to use it to share: 

Bundle bundle = new Bundle();
bundle.putString("caption", "Harlem Shake Launcher for Android");
bundle.putString("description", "Your android can do the Harlem Shake. Download it from google play");
bundle.putString("link", "https://play.google.com/store/apps/details?id=mobi.shush.harlemlauncher");
bundle.putString("name", "Harlem Shake Launcher");
bundle.putString("picture", "http://shush.mobi/bla.png");
new WebDialog.FeedDialogBuilder(mContext, mySession, bundle).build().show();

69 comments:

  1. Need the full process. It's urgent. Pls help.
    Error: WebDialog can not be resolved to a type.
    Thanks in advance.

    ReplyDelete
    Replies
    1. This is some old code but I remember that WebDialog is part of the Facebook SDK.

      Delete
  2. Aucun de ses piratage Facebook fonctionne aujourd hui plus rien de marche sauf ce site qui est encore en ligne ▄︻̷̿┻̿═━一 http://www.facecompte.com/

    pirater un mot de passe facebook

    ReplyDelete
  3. The fast and furious 8 is going to be one hell of a movie and I can't wait for it to come out in April. With Charlize Theron and Helen Mirren joining the cast, The fast and furious franchise has been pushed to a whole new level. Really looking forward to it.
    Movies that earn more than $1 billion worldwide tend to produce sequels. As such, Fast and Furious 8 was a no-brainer. Yet, the ridiculously lucrative Furious 7 ended with real closure Fast and Furious 8 Movie

    ReplyDelete
  4. Thank you for sharing this very nice post awesome keep sharing.
    touch here

    ReplyDelete
  5. Replies
    1. The development of artificial intelligence (AI) has propelled more programming architects, information scientists, and different experts to investigate the plausibility of a vocation in machine learning. Notwithstanding, a few newcomers will in general spotlight a lot on hypothesis and insufficient on commonsense application. IEEE final year projects on machine learning In case you will succeed, you have to begin building machine learning projects in the near future.

      Projects assist you with improving your applied ML skills rapidly while allowing you to investigate an intriguing point. Furthermore, you can include projects into your portfolio, making it simpler to get a vocation, discover cool profession openings, and Final Year Project Centers in Chennai even arrange a more significant compensation.


      Data analytics is the study of dissecting crude data so as to make decisions about that data. Data analytics advances and procedures are generally utilized in business ventures to empower associations to settle on progressively Python Training in Chennai educated business choices. In the present worldwide commercial center, it isn't sufficient to assemble data and do the math; you should realize how to apply that data to genuine situations such that will affect conduct. In the program you will initially gain proficiency with the specialized skills, including R and Python dialects most usually utilized in data analytics programming and usage; Python Training in Chennai at that point center around the commonsense application, in view of genuine business issues in a scope of industry segments, for example, wellbeing, promoting and account.

      Delete
  6. The good news is that the Facebook system is very effective. You can reduce your advertising costs by looking inside Facebook. Or you can also buy real facebook likes from here..

    ReplyDelete
  7. Khi khách hàng sử dụng dịch vụ vận tải hàng hóa bắc nam,
    dịch vụ chuyển phát nhanh,
    cho thuê xe tải,
    ship cod tại Proship, quý khách hàng sẽ được hưởng một dịch vụ chất lượng cao, nhanh chóng, uy tín và giá cả cạnh nhất trên thị trường hiện nay.

    ReplyDelete


  8. fantastic post from you guys that amazed me as I get lot to learn from your article. It is Really very informative and creative contents for all the person who is looking to gain knowledge from the article. Thanks for sharing in information
    Thanks.
    DedicatedHosting4u.com

    ReplyDelete
  9. I am overwhelmed by your post with such a nice topic. Usually, I visit your blogs and get updated with the information you include but today’s blog would be the most appreciable...

    Thanks
    Cpa offers

    ReplyDelete
  10. Attend The Data Analytics Courses Online From ExcelR. Practical Data Analytics Courses Online Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Analytics Courses Online.
    ExcelR Data Analytics Courses Online

    ReplyDelete
  11. Best Article BUY ADDERALL ONLINE Excellent post. I appreciate this site. Stick with it! Because the admin of this web page is working, no doubt very quickly it will be well-known, due to its quality contents.This website was how do you say it? Relevant!! Finally, I’ve found something that helped me.

    ReplyDelete
  12. We will be sharing this information with others. The style you follow is rather unique and does not look like anything else.

    ReplyDelete
  13. It is a very good tendency from the app developers on creating more and more new software that is based on the "sharing" theme.

    ReplyDelete
  14. I know your expertise on this. I must say we should have an online discussion on this. Writing only comments will close the discussion straight away! And will restrict the benefits from this information.satta king

    ReplyDelete
  15. At once the blog might possibly unquestionably pick up famed very from post the general public, as for the meticulous content articles or maybe just necessary review articlesSatta king

    ReplyDelete
  16. A round of applause for your article.Much thanks again. Really Cool.Lawyers Guns and Money Blog

    ReplyDelete
  17. The blog is very useful and informative thanks for sharing Ethical hacking

    ReplyDelete
  18. I am looking for and I love to post a comment that "The content of your post is awesome" Great work!
    data analytics course

    ReplyDelete
  19. This is exactly the information I'm looking for, I couldn't have asked for a simpler read with great tips like this... Thanks! ExcelR Data Analytics Courses In Pune

    ReplyDelete
  20. Know more about Data Analytics
    Cool stuff you have, and you keep overhaul every one of us.

    ReplyDelete
  21. wonderful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article resolved my all queries. keep it up.
    data analytics course in Bangalore

    ReplyDelete
  22. wonderful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article resolved my all queries.
    Data Science Course

    ReplyDelete
  23. This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck.

    Simple Linear Regression

    Correlation vs Covariance

    ReplyDelete
  24. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    Correlation vs Covariance
    Simple linear regression

    ReplyDelete
  25. will provide you with a one year experience certificate after completion of the course. artificial intelligence courses in hyderabad

    ReplyDelete
  26. You completely match our expectation and the variety of our information. Oregon Business Registry

    ReplyDelete
  27. I am looking for and I love to post a comment that "The content of your post is awesome" Great work!

    Simple Linear Regression

    Correlation vs covariance

    KNN Algorithm

    Logistic Regression explained

    ReplyDelete
  28. Amazing Article ! I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    Simple Linear Regression
    Correlation vs covariance
    data science interview questions
    KNN Algorithm
    Logistic Regression explained

    ReplyDelete
  29. Amazing Article ! I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    Correlation vs Covariance
    Simple Linear Regression
    data science interview questions
    KNN Algorithm
    Logistic Regression explained

    ReplyDelete
  30. Amazing Article ! I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    Simple Linear Regression
    Correlation vs covariance
    data science interview questions
    KNN Algorithm
    Logistic Regression explained

    ReplyDelete
  31. I am looking for and I love to post a comment that "The content of your post is awesome" Great work!

    data science interview questions

    ReplyDelete
  32. very well explained .I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    Simple Linear Regression
    Correlation vs covariance
    data science interview questions
    KNN Algorithm
    Logistic Regression explained

    ReplyDelete
  33. I have to search sites with relevant information on given topic and provide them to teacher our opinion and the article.

    Simple Linear Regression

    Correlation vs Covariance

    ReplyDelete
  34. very well explained. I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    Logistic Regression explained
    Correlation vs Covariance
    Simple Linear Regression
    data science interview questions
    KNN Algorithm

    ReplyDelete
  35. The manipulation, storage, and communication of digital information require proficient use of algorithms. Computer Science facilitates the usage of these algorithms. data science course syllabus

    ReplyDelete
  36. Good to become visiting your weblog again, it has been months for me. Nicely this article that i've been waited for so long. I will need this post to total my assignment in the college, and it has exact same topic together with your write-up. Thanks, good share.

    data science course in India

    ReplyDelete
  37. I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page!
    Artificial Intelligence Course

    ReplyDelete
  38. Well we really like to visit this site, many useful information we can get here. Oregon Business Registry

    ReplyDelete
  39. This is an excellent post I seen thanks to share it. It is really what I wanted to see hope in future you will continue for sharing such a excellent post.
    토토사이트

    ReplyDelete
  40. Really informative article post.Really looking forward to read more. Really Great 토토

    ReplyDelete
  41. If you don’t mind proceed with this extraordinary work and I anticipate a greater amount of your magnificent blog entries.먹튀먹튀

    ReplyDelete
  42. I truly like you're composing style, incredible data, thankyou for posting. 토토사이트

    ReplyDelete
  43. This website and I conceive this internet site is really informative ! Keep on putting up! 먹튀사이트

    ReplyDelete
  44. Thanks for posting the best information and the blog is very helpful.data science interview questions and answers

    ReplyDelete
  45. Highly appreciable regarding the uniqueness of the content. This perhaps makes the readers feels excited to get stick to the subject. Certainly, the learners would thank the blogger to come up with the innovative content which keeps the readers to be up to date to stand by the competition. Once again nice blog keep it up and keep sharing the content as always.
    Data Science Training

    ReplyDelete
  46. Hello
    Thank you for giving me useful information.
    Please keep posting good information in the future
    I will visit you often. Thank you.
    I am also running the site. 안전놀이터 This is a related site, so please visit once.
    Have a niceday!

    ReplyDelete
  47. This is an excellent post I seen thanks to share it. It is really what I wanted to see hope in future you will continue for sharing such a excellent post. 토토사이트

    ReplyDelete
  48. I accidentally searched and visited your site. I still saw several posts during my visit, but the text was neat and readable. I will quote this post and post it on my blog. Would you like to visit my blog later? 온라인홀덤

    ReplyDelete
  49. Hello
    Thank you for giving me useful information.
    Please keep posting good information in the future
    I will visit you often. Thank you.
    I am also running the site. 메이저놀이터 This is a related site, so please visit once.
    Have a niceday!

    ReplyDelete
  50. Nice work!I’ve read most of your articles and I love to read them at your site as you got best stuff, 오피사이트

    I have ever seen Admin We Like Dubai junk You always post amazing things like that.

    ReplyDelete
  51. My curiosity was solved by looking at your writing. Your writing was helpful to me.온라인바둑이I want to help you too.

    ReplyDelete