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 6856965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:57:19+00:00 2026-05-27T01:57:19+00:00

Can someone please explain to me how can I have a download link appear

  • 0

Can someone please explain to me how can I have a download link appear when a user presses the share button on a feed dialog box? I’m using the following code: (with my own information of course)

Post to Feed

<script> 
  FB.init({appId: "YOUR_APP_ID", status: true, cookie: true});

  function postToFeed() {

    // calling the API ...
    var obj = {
      method: 'feed',
      link: 'https://developers.facebook.com/docs/reference/dialogs/',
      picture: 'http://fbrell.com/f8.jpg',
      name: 'Facebook Dialogs',
      caption: 'Reference Documentation',
      description: 'Using Dialogs to interact with users.'
    };

    function callback(response) {
      document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
    }

    FB.ui(obj, callback);
  }

</script>

I have no clue on how to do is: what code do I need so that when a user clicks “share” a download box appears? But if they click cancel a message pops up telling them they need to share first? I have posted a similar question before and I got an answer saying I need to use some sort of JavaScript but the problem is I don’t know how or what to write? Can someone please show and explain the sort of JavaScript I need to me because I don’t know how to use JavaScript one bit.

Thanks in advance for any answers/help!!

  • 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-05-27T01:57:20+00:00Added an answer on May 27, 2026 at 1:57 am

    The callback function is executed when the user completes the feed post dialog, with either the “share” or “cancel” button. You can test for a “post_id” to see which action the user took. Then either show the download box or display an alert (or perhaps a more user-friendly message format).

    Add a hidden download box element to your page with an id of “download_box”:

    <div id="download_box" style="display: none;">
        Download Box (whatever that means) goes here
    </div>
    

    And replace your current “callback” function:

    function callback(response) {
        if (response && response.post_id) {
            document.getElementById('download_box').style.display = 'block';
        } else {
            alert('You must share your post before you can download.');
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a feeling this XML is not valid, can someone please explain why?
Can someone please explain why this works. Here is the scenerio. I have a
Can someone please explain simply what thread contention is? I have googled it, but
I have regex which reads: @<img\s*[^>]*>(?:\s*?</img>)? Can someone please explain this part: (?:\s*?)? What
Can someone please explain this to me? I have the following code: <form action=<?php
Can someone please explain this piece of code which I have tried to decipher?
In WPF: Can someone please explain the relationship between DependencyProperty and Databinding? I have
I have a text file in an app. Can someone please explain, algorithmically, how
Can someone please explain why ?___SID=U is appearing in some Magento URLs on my
Can someone please explain how Read/Show works.. I cannot find any tutorials on it.

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.