php - How to change the FB login button with own image

283

I am trying to change the default FB login button with the one I would like to use. Here is the code FB generate for me by default when creating a FB login:

<div class="fb-login-button" data-show-faces="true" data-width="200" data-max-rows="1"></div>

My code is in PHP and html5. Is there a way I a change the default fb-login-button with my personal one?

472

Answer

Solution:

Not via PHP, no; because the Facebook stuff is added by a client-script that Facebook includes in your page by its bootstrap script.

The only way to change it is by writing your own script that changes your page's DOM after Facebook's scripts have run, this way you can modify the Facebook button and other stuff; but be careful because Facebook can modify their scripts without telling you so your patch script might not work.

People are also looking for solutions to the problem: performance - PHP Template editor using file storage , database or both?

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.