Roku Direct Publisher

Roku Direct Publisher - the easiest way to create a great TV experience. Learn more about how to create a Roku channel and share your experiences with others.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ferdiworks
Roku Guru

WP Smart TV plugin and converting over to SDK Channel

This is for informational purposes only!

WP Smart TV plugin and converting over to SDK Channel

I wanted to share that some of the users still trying to use The Smart TV Plugin for their SDK channel conversions!

A developer I know was trying to use and keep his WP Smart TV plugin and JSON Feed

https://mywplink.com/wp-json/tv/roku/

The SDK packages would not accept the WP Smart TV JSON Feed link!

He tried to find the actual JSON Feed file and the link or location of the JSON Feed file in the directory structure of his hosting account!

He wrote Rob at Rovidx

I heard back from the developer of the Smart TV WP plugin.  Regarding an actual JSON file, there isn't one:

 

Hey Scott,

 

There is no JSON file.  Everything is generated using the WordPress REST API using endpoints.   Most of the examples I've seen would let you use your URL without specifying a file. 

 

Rob

 

Nonetheless, Scott, I was able to create a way to let the code think there is an actual ".json" file. 

By adding a redirect WordPress plugin and redirecting to a link for a JSON feed file name that doesn't really exist he was able to add a JSON File link to his SDK manifest to let his SDK Package template read the SDK! 

An example would be if the WordPress link used for the JSON was:

https://mywplink.com/wp-json/tv/roku/

You would add a redirect plugin and redirect to a link like this:

https://mywplink.com/wp-json/tv/roku/feed.json

It was reported as working and Scott was able to keep using his WP Smart TV Plugin to manage his SDK Channel!

 

 

 

 

OnDemandTV
admin@ondemandtvnetworks.com
0 Kudos
5 REPLIES 5
johnary
Streaming Star

Re: WP Smart TV plugin and converting over to SDK Channel

Nice work!

0 Kudos
podworx
Streaming Star

Re: WP Smart TV plugin and converting over to SDK Channel

Hey, Joe.

Happy I was able to help. One thing. . .you got the redirect backwards. 

The sdk requires the presence of the .json file. So the redirect works like this:

Send the sdk to:

http://domain.com/roku.json

This satisfies the sdk codes requirement for the correct extension (.json).

When that url request hits the WordPress site, the redirect sends it to the actual rest api url that ends in /tv/roku.

We're tricking the sdk into thinking it is reading a .json file when it's actually being redirected.

0 Kudos
johnary
Streaming Star

Re: WP Smart TV plugin and converting over to SDK Channel

Tried to get this to work on my own Wordpress site, but all I got was this message when I would pull up the URL:

{"code":"rest_no_route","message":"No route was found matching the URL and request method.","data":{"status":404}}

I went from https://domain.com/fff/wp-json/tv/roku/

to

https://domain.com/fff/wp-json/tv/roku/sample.json 

When I redirect to https://domain.com/fff/sample.json I get a 404 error.

0 Kudos
podworx
Streaming Star

Re: WP Smart TV plugin and converting over to SDK Channel

Looks like you're doing this backwards.

 

If you're using the redirect plugin (I use 301 Redirects, btw), you want to do this:

Redirect FROM:

https://domain.com/roku.json (this file doesn't actually exist)

Redirect TO:

http://domain.com/wp-json/tv/roku/ (this is the actual REST API json feed)

 

 

0 Kudos
ferdiworks
Roku Guru

Re: WP Smart TV plugin and converting over to SDK Channel

The JSON feed file URL needs to end in a dot json = .json inside the SDK Template package!

WP Smart TV does not have an output URL as dot JSON = .json and it uses a URL like this: http://domain.com/wp-json/tv/roku/  so we use the redirect to rediret http://domain.com/wp-json/tv/roku.json  to https://domain.com/roku/ so the SDK Package can see the JSON Feed file!

This has been tested and used by many WP Smart TV users converting to SDK and allowing them to still use the WP Smart TV Plugin!

OnDemandTV
admin@ondemandtvnetworks.com
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.