Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video source is incorrect #5

Open
coolcontent opened this issue May 4, 2018 · 6 comments
Open

Video source is incorrect #5

coolcontent opened this issue May 4, 2018 · 6 comments

Comments

@coolcontent
Copy link

coolcontent commented May 4, 2018

Currently the video src is wrong, it uses the permalink_url. So you can't play the video, the player shows: "Kein Video mit unterstützem Format und MIME-Typ gefunden."

I checked the Graph API Explorer from facebook for developers and found the correct source which is working (the video can be played). It is "source" instead of permalink_url:

{
  "videos": {
    "data": [
      {
        "source": "https://video.xx.fbcdn.net/v...."
      }
     ]
  }
}

The permalink_url is correct for the link to the Facebook Video.
So only the video src='' is needed to be changed to source.

@theDyingMountain
Copy link
Member

Thx for your hint, but the permalink_url isn't used. If the post is of type video, the code checks that the "source" node isn't empty, else the "link" node is used.

@coolcontent
Copy link
Author

coolcontent commented May 11, 2018

Maybe I'm wrong, but according to the Graph API Explorer the link node only gives the link to the facebook page. permalink_url gives the url to the video page in facebook, source is the direct link to the video.
I've tested the node "videos" => sub node "source" in data[] should be the correct one.
When I click on a link of the sub node "source" it shows me the video, no matter how old it is.
Please see this screenshot:
bildschirmfoto 2018-05-11 um 10 43 26

@theDyingMountain
Copy link
Member

Hm it looks like the video node is not submitted if i open the page url in browser and not in the Graph API Explorer: Please see this link

@coolcontent
Copy link
Author

coolcontent commented May 18, 2018

Ok, I understand that you can't use "videos" => "source" because you don't have the possibility to add the node "videos" instead of the node "link" when the media is a video. Instead you always use the "link" node. Right?

Is there another possibility to make the videos running? I can't get them running with your tool (latest version 0.9.59) on Contao 4.5.8:
bildschirmfoto 2018-05-18 um 16 37 16

It runs with the link from "source", see this screenshot:
bildschirmfoto 2018-05-18 um 16 38 08

@theDyingMountain
Copy link
Member

The problem depends on the API Changes in April. I found this in the docs:

As of April 30, 2018, the source field for /page/feed and /page/posts will no longer be returned for Page-owned videos unless the User making the request has a role on the owning Page.

Our Tool is now in the facebook review process and we're waiting for response.

@coolcontent
Copy link
Author

Something like this may work:
$requestVideoSource = $fb->request('GET', '/me/videos?fields=source');

At least you can get all source links via curl - e.g.
curl -i -X GET "https://graph.facebook.com/v2.12/me/videos?fields=source&access_token={your-access-token}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants