简体   繁体   English

如何将图像从android上传到Facebook

[英]how to upload an image to facebook from android

I'm a new coder to android and I need to upload an image from my app to Facebook and/or twitter. 我是android的新编码员,我需要将应用程序中的图片上传到Facebook和/或Twitter。 I know that I need to use the Facebook SDK for Facebook, but I have no idea what to use for twitter, or what code to use once I've installed the SDK. 我知道我需要为Facebook使用Facebook SDK,但是我不知道将什么用于Twitter,或者在安装SDK后不知道使用什么代码。 Can anyone help me with this? 谁能帮我这个? Thanks in advance 提前致谢

After you have facebook sdk setup a login button. 在您完成facebook sdk的设置后,请登录。 That will do all the login work for you. 这将为您完成所有登录工作。 Then go inside facebook sdk and check demos they have there. 然后进入facebook sdk并检查他们在那里的演示。 you have one with the code for what you need. 您可以根据自己的需要编写代码。 You can also check the facebook dev for Graph API or Open Graph "path" you need to do what you want. 您也可以检查Facebook开发人员是否需要执行Graph API或Open Graph“路径”。 Bty the way, Facebook sdk have a resquest class that handle all that for you. 顺便说一句,Facebook SDK有一个resquest类,可以为您处理所有这些。 you just need to setup the graph path and the object you want to upload. 您只需要设置图形路径和要上传的对象。 You can find more on Graph API reference on facebook Dev site and how to to handle photos here: Facebook Dev Pictures 您可以在Facebook Dev网站上找到有关Graph API参考以及如何处理照片的更多信息: Facebook Dev Pictures

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM