2

I need to upload videos to Facebook and I'm using Facebook Autopost and Rules module.

I've followed the video tutorials from:

They teach how to post images and text but none mention videos. How can I upload videos with this module?

2
+100

No. Not without building upon it. While the version of the FB PHP SDK (3.2.3) that the module relies on supports uploading video, there is no support for it in the module.

Looking at the current module, it looks possible to build in support. For example, take the scenario where the module supports uploading an image to the user timeline:

Presumably, one could extend another class (e.g. FBAutopostEntityVideo) from FBAutoPostEntity that would add the various details for base classes that would allow it to plug in to the underlying SDK.

To sum it up, the existing module doesn't support however there's some support at lower levels in the code. That comes with the caveat that there might be more overhead to add (e.g. is there more to defining a Video entity than just extending the FBAutoPostEntity class) than what I mentioned here.

  • Thanks for your reply, in admin/structure/facebook-publications there is the Add facebook publication type, Can I define new publication type that supports video? and if yes how can I connect its fields with Facebook? – M a m a D Aug 24 '16 at 3:32
  • It looks like the entity machine name does correspond with the $type var so that gets you halfway there. As mentioned, facebook_autopost_entity() will still return a FBAutoPostEntity object which won't define the extra parameters needed. You could follow the pattern set by FBAutopostEntityPhoto where its setting the source / name parameters from the entities Source/Title fields in the publishParameterPrepare() method. It looks like in order to implement this you'll probably have to define your own custom action that builds off what the module has supplied you. – Shawn Conn Aug 24 '16 at 5:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.