Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7895361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:37:30+00:00 2026-06-03T07:37:30+00:00

I have a Facebook app with which I’d like to display an image in

  • 0

I have a Facebook app with which I’d like to display an image in a user’s feed. It’s just a small circle, which will be different colours depending on what the user does within my app.

Instead of creating lots of different images to display, one for each possible colour the circle could be, it would be ideal if I could put up a PNG with transparency, and then just change the colour by filling a DIV behind the image with Javascript.

However, it’s not clear to me if Facebook will allow that in the feed.

Can include some Javascript in the feed, or is that strictly forbidden?

Or is my only option to have a library of images for all the different colours and have a PHP function which selects the right one to output?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:37:31+00:00Added an answer on June 3, 2026 at 7:37 am

    Facebook doesn’t allow any scriptable content within feed stories, and this isn’t possible to implement what you want this way.

    You can easily create simple script that will return colored image according to passed arguments and use it as source for the image.

    Something like this may provide you some points:

    <?
    // create a 200*200 image
    $img = imagecreatetruecolor(200, 200);
    
    // get the color from URL arguments or use default one
    $rgb = isset($_REQUEST['color']) ? $_REQUEST['color'] : 'FFEEDD';
    
    $color = array(
      base_convert(substr($rgb, 0, 2), 16, 10),
      base_convert(substr($rgb, 2, 2), 16, 10),
      base_convert(substr($rgb, 4, 2), 16, 10),
    );
    
    // allocate some colors
    $white = imagecolorallocate($img, 255, 255, 255);
    $red   = imagecolorallocate($img, $color[0], $color[1], $color[2]);
    
    // draw the head
    imagefilledarc($img, 100, 100, 200, 200, 0, 360, $red, IMG_ARC_PIE);
    
    // output image in the browser
    header("Content-type: image/png");
    imagepng($img);
    
    // free memory
    imagedestroy($img);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a working Facebook app that most users will use just once. Leading
I have a facebook app which I'd like to test using Watir. The problem
I have an open-source app which uploads photos to Facebook. To save bandwidth, the
I have an app where users can sign up with Facebook, in which case
I have facebook login setup in my android app. When the user clicks login
We have created a facebook-app which contains a fb:comment field. We have included the
I am having a facebook app which on loading will load my GWT application
I have a Canvas Facebook app embedded via an iframe. I would like to
I have an app which requests infomation to facebook then get infromation from facebook.
I am developing a Facebook app. I have a server side OAuth flow which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.