How I can post link in html to youtube comment - php

I am trying to post a html link on YouTube comment but Some how I could not do that thing. It always shows html codes on the comment section. I am using php function
$comment = 'Shawon';
$commen = html_entity_decode($comment);
It shows the output as the html codes in $comment. Or tell me which content-type will work for this.
Could you please help me?

It seem it is not possible: https://developers.google.com/youtube/2.0/developers_guide_protocol_comments
A comment is a text response to a video. Logged-in users can add comments to a video but cannot modify or delete those comments. In addition, please note that YouTube will convert any HTML markup that appears in a comment into plain text. Typically, a user would add a comment to a video after watching that video.

Related

PHP is echoing text from json value in a one paragraph where as the JSON Value is having multiple line spaces

I am trying to fetch data from my youtube channel to my website using Youtube data api and PHP.
I am not asking here how to print text from json array. But I am asking how to print a text as it is. Please look into following images.
Image from chrome element console
Image from PHP webpage
The first image, is from my webpage. It is printing description of my youtube video. I collecting this video from JSON Array and the code is:
<?php echo $details["items"][0]["snippet"]["description"];?>
But if I check in the chrome console, element section:
The text is exactly as it is in my youtube video description. (Please look at the second image)
I want to print the text as it is in the description (as it appears in the second image).
I hope you have understood the issue. Please guide me how to solve the issue.
I have figured out the solution. If any one come across the same issue, it might help.
Initially, I was echoing the text but it has its own format. PHP echo was ignoring the format of the text. Here goal is to keep the format of the text. Therefore we are required to wrap the text in <pre></pre> tags
This tag would print the text from source as it is.
<?php echo '<pre>'.$details["items"][0]["snippet"]["description"].'</pre>';?>

Add a hyperlink to a HelloSign template

I am using HelloSign with PHP SDK to send an agreement to users to sign. I need to add a link to 'Terms of Service' in the body of the signing document, so that users can click, visit the link and return to sign the document. I am using a PDF with a clickable hyperlink as the HelloSign template but HelloSign does not seem to support links on templates. The links appear as flat text and not clickable. How can I get this done in HelloSign?
Thank you so much for your question. I will be more than happy to assist you with this.
That is correct, all hyperlinks are removed from the documents. The url will be in shown in plain text but will not be clickable. This is the case for ANY signature request: non-embedded and embedded.
A suggested workaround for non-embedded signature requests is to add the link to the message body of the signature request.
Please let me know about any additional questions that you may have.
Thanks!
LaToya

How to display video a url in php?

I'm trying to create a form in which a user inserts their youtube code into a field, which is then stored in mysql.
how can i display video?... while fetching data from my database it displays the video url name
How can I do it so that the link is permanently fixed in the php document and the end part is retrieved from mysql in a way that when the page is opened it displays the video correctly?
Very simple stuff when you know how to do it but I don't so I would appreciate if someone could tell me the way of doing this.
without embed only for example this url which will insert into database "https://www.youtube.com/watch?v=T95zFC4Z2pY" while retiring it by <?php echo $res['link']; ?> is there any other why except embed tag
you can use <iframe></iframe> tag. I hope it will helpful for you.
Try this:
<iframe width="420" height="345"
src="https://www.youtube.com/watch?v=T95zFC4Z2pY">
</iframe>
Since you are not giving an example of any code you have tried so far, I will not provide the code, instead I am going to point you in the direction.
Open up the youtube video Embed Tutorial
Then click on 'Share' under the description, then click on 'Embed'. Youtube will give you the code you need to embed your video.

Link picture to facebook status (using graph API)

I have tried almost everything to link picture to Facebook status that is created via Facebook Graph API from other web application.
I am sending POST request to https://graph.facebook.com/me/feed with these fields:
message = text that is correctly displayed
link = link to page that also works well
picture = link to picture that I want to display in status (not working)
type = picture
I have tried to use source field instead of picture field, tried to ommit type field, I have also tried to use picture directly as a link field.
I have also tried to use picture (or source) field to point on URL directly with picture data, or to page containing that image mentioned in og:image meta tag.
None of mentioned worked. I can only post a status with text and correct link, picture is never included. On the other hand, I have realized, that link to my picture is wrapped in some Facebook link (this is visible in element inspector in one of div elements of status on Facebook wall), but this link does not work – it shows gray gif picture large 1px by 1px. I have tried to remove all special characters from link, now it is in simple form eg. foo.bar/some/path/picture12.
Nothing worked
Make sure that you include the link to in the post:
link=http://url.to.your.canvas.app/another.link
The link provided as a landing page needs to be on the same domain as the one you have specified in the application settings on developers.facebook.com
Also instead of me you should use your Facebook ID ( as a good practice )`

reading only text from Html using PHP

i read the meta tags from a PHP script that read the url convert it to html and then read the tags and title .................for this no problem but the problem is i wants to read only the text from html...............
for Example when you put a link on facebook you can see that i read's your Title and some text from your webpage url.
like the google does while search the web page.
i wants to know that how can i write a script that work like a facebook book mark.........
Use DOMDocument::loadHTML

Categories