这个问题看起来与“使用Facebook SDK在Facebook上共享视频”或“使用共享意图共享纯文本或图像”相似,但没有任何关系。我在so->上关注了这些帖子
Android共享Facebook意向
如何通过Android共享意图在Facebook上分享带有标题的照片?
和此外部链接
http://sudarmuthu.com/blog/sharing-content-in-android-using-action_send-intent
package com.mypackage.share;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
public class FbshareActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("image/jpg");
share.putExtra(Intent.EXTRA_STREAM,Uri.parse("file:///mnt/sdcard/tutu.jpg"));
startActivity(Intent.createChooser(share, "Share Image"));
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mypackage.share"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:label="@string/app_name"
android:name=".FbshareActivity" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
我可以在Facebook上分享这张照片。
现在我要上传视频:我替换了这一行:share.settype(“image/jpg”);
使用此
share.setType(“video/3GPP”);
这一个share.putextra(intent.extra_stream,uri.parse(“**file://mnt/sdcard/dimg1333456357958.jpg”);**这一个
share.putextra(intent.extra_stream,uri.parse(“**file://mnt/sdcard/a123bghy4.3gpp”);**
但我在运行代码时遇到了以下错误:
/Environment(30996): getExternalStorageState/mnt/sdcard
E/Environment(30996): getExternalStorageList
W/MountService( 2879): getVolumeState(/mnt/sdcard/external_sd): Unknown volume
W/MountService( 2879): getVolumeState(/mnt/sdcard/external_sd): Unknown volume
E/Environment(30996): getExternalStorageState/mnt/sdcard
D/SurfaceFlinger( 2879): [JJ]removeSurface for sid=74
D/dalvikvm(30996): GC_CONCURRENT freed 1106K, 19% free 8612K/10503K, paused 3ms+5ms
E/SurfaceFlinger( 2879): [JJ]SurfaceFlinger FPS: 24.994677
D/ACRA (30996): Writing crash report file.
D/ACRA (30996): Mark all pending reports as approved.
D/ACRA (30996): Looking for error files in /data/data/com.facebook.katana/app_acra-reports
V/ACRA (30996): About to start ReportSenderWorker from #handleException
D/ACRA (30996): Add user comment to null
D/ACRA (30996): #checkAndSendReports - start
D/ACRA (30996): Looking for error files in /data/data/com.facebook.katana/app_acra-reports
I/ACRA (30996): Sending file 1333628258000-approved.stacktrace
D/ACRA (30996): Connect to https://www.facebook.com/mobile/android_crash_logs/
D/ACRA (30996): Setting httpPost headers
D/ACRA (30996): Sending request to https://www.facebook.com/mobile/android_crash_logs/
D/dalvikvm(30996): GC_CONCURRENT freed 631K, 18% free 8644K/10503K, paused 5ms+2ms
W/ResponseProcessCookies(30996): Invalid cookie header: "Set-Cookie: datr=ZY19T4_v6CV68jQn4FTduX_l; expires=Sat, 05-Apr-2014 12:17:41 GMT; path=/; domain=.facebook.com; httponly". Unable to parse expires attribute: Sat
E/SurfaceFlinger( 2879): [JJ]SurfaceFlinger FPS: 4.741684
D/BatteryService( 2879): update start
D/ACRA (30996): #checkAndSendReports - finish
E/AndroidRuntime(30996): FATAL EXCEPTION: main
E/AndroidRuntime(30996): java.lang.NullPointerException
E/AndroidRuntime(30996): at com.facebook.katana.service.method.VideoUpload.getRealPathFromURI(VideoUpload.java:144)
E/AndroidRuntime(30996): at com.facebook.katana.service.method.VideoUpload.start(VideoUpload.java:165)
E/AndroidRuntime(30996): at com.facebook.katana.binding.AppSession.postToService(AppSession.java:4212)
E/AndroidRuntime(30996): at com.facebook.katana.service.method.VideoUpload.RequestVideoUpload(VideoUpload.java:73)
E/AndroidRuntime(30996): at com.facebook.katana.activity.media.UploadVideoActivity.upload(UploadVideoActivity.java:209)
E/AndroidRuntime(30996): at com.facebook.katana.activity.media.UploadVideoActivity.onClick(UploadVideoActivity.java:169)
E/AndroidRuntime(30996): at android.view.View.performClick(View.java:3100)
E/AndroidRuntime(30996): at android.view.View$PerformClick.run(View.java:11644)
E/AndroidRuntime(30996): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime(30996): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime(30996): at android.os.Looper.loop(Looper.java:126)
E/AndroidRuntime(30996): at android.app.ActivityThread.main(ActivityThread.java:4002)
E/AndroidRuntime(30996): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(30996): at java.lang.reflect.Method.invoke(Method.java:491)
E/AndroidRuntime(30996): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
E/AndroidRuntime(30996): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
E/AndroidRuntime(30996): at dalvik.system.NativeStart.main(Native Method)
D/SurfaceFlinger( 2879): screenshot: sw=216, sh=135, minZ=0, maxZ=21015
W/ActivityManager( 2879): Force finishing activity com.facebook.katana/.activity.media.UploadVideoActivity
D/SurfaceFlinger( 2879): screenshot: result = OK
E/android.os.Debug( 2879): Dumpstate > /data/log/dumpstate_app_com_facebook_katana_error
I/dumpstate(31581): begin
W/ActivityManager( 2879): Activity pause timeout for ActivityRecord{40f51e68 com.facebook.katana/.activity.media.UploadVideoActivity}
F//system/bin/logcat(31586): stack corruption detected: aborted
W/PowerManagerService( 2879): Timer 0x3->0x3|0x0
D/VoldCmdListener( 87): asec list
I/dumpstate(31581): done
D/InputTransport( 2879): channel '41014710 Sorry! - Use *#9900# to take log - (server)' ~ mPointerStates->semaphore initialized 0x586ac000.
D/InputTransport( 2879): channel '41014710 Sorry! - Use *#9900# to take log - (server)' ~ mPointerStates initialized 0x586ac000.
D/InputTransport( 2879): channel '41014710 Sorry! - Use *#9900# to take log - (client)' ~ mPointerStates initialized 0x587f1000.
E/SurfaceFlinger( 2879): [JJ]SurfaceFlinger FPS: 0.207880
D/SurfaceFlinger( 2879): [JJ]createSurface for pid 31559 (1280 x 752)
D/SurfaceFlinger( 2879): [JJ]createSurface for pid 2879 (1 x 1)
E/SurfaceFlinger( 2879): [JJ]SurfaceFlinger FPS: 18.909105
我如何调试com.facebook.katana?请阿西特。RGDS
在facebook的共享意图中显然存在一个bug-->http://bugs.developers.facebook.net/show_bug.cgi?id=16728,我怀疑这是它不起作用的原因。Rgds,Softy
我有一个Facebook页面,我正在尝试上传一个已经托管在我的服务器上的视频。我需要通过javascript来做到这一点,我所拥有的只是视频的src链接(类似于 )。作为管理员,我拥有所有必需的权限()。 facebook api说我必须以的形式发送数据,这意味着视频内容。为了通过ajax实现这一点,我在stackoverflow上回答了这个问题,并学习了如何在jQuery中使用ajax请求发送F
问题内容: 我有一个拥有HTML5视频播放器的网站。 我想在Facebook上共享链接,并且用户之一在facebook上单击该帖子的图像,它就会开始在此处播放视频。 就像youtube视频和vimeo视频一样。 我怎样才能做到这一点? 谢谢 问题答案: 我有一个拥有HTML5视频播放器的网站。 您想找到一个好的SWF(*.SWF)视频播放器,该视频播放器可以将视频从(将参数传递给播放器) 现在,当
我有我导出到数据uri图像的HTML画布。现在我想通过点击我页面上的自定义链接,在Facebook时间线上尽可能轻松地分享这张图片(无需创建FB应用程序和身份验证令牌)。 我试过这样的方法: 图像生成: 共享链接: 当我点击链接Safari我得到 如何通过Facebook共享者URL(或其他方式)轻松共享数据uri图像? 谢谢你的回答!
我正在使用ShareKit在Facebook上共享一条简单的文本。我使用cocoapods在我的应用程序上安装ShareKit(使用iOS7和XCode5),并遵循配置教程ConfigurationShareKit。更具体地说,我会做以下事情: 1) 将URL方案写入plist。 2) 创建DefaultShkConfiguration子类: 3)在AppServer ate中进行初始配置: 4)
我正在通过共享按钮将视频上传到youtube。如果我点击上传按钮,它会显示社交图标,比如whatsapp、facebook、youtube。当我点击youtube时,它应该被上传到youtube。 下面是我的代码: 选择视频后,我可以选择youtube图标。然后,您的Tube窗口会自动关闭。任何建议都是非常可观的。谢谢!