title: How to generate a notification in Facebook?
body: <p>I want to build an app which generates a notification (like SMS -> mobile user will get a notification on his or her phone like while reciving a SMS) for a small range of users that are subscribing that notifications.</p>
  
  <p>I have build an App and such a Community Page (I'm not very familar with Facebook).</p>
  
  <p>Here is my code:</p>
  
  <pre class="lang-php prettyprint-override"><code>//PHP SDK
  require 'include/facebook.php';
  
  //Instant Facebook-Object
  $facebook = new Facebook(array(
    'appId'  =&gt; '...',
    'secret' =&gt; '...',
    'cookie' =&gt; true,
  ));
  
  $user = $facebook-&gt;getUser();
  
  if ($user) {
    try {
      // Proceed knowing you have a logged in user who's authenticated.
      $userData = $facebook-&gt;api('/me');
    } catch (FacebookApiException $e) {
      error_log($e);
      $user = null;
    }
  }
  
  // If a user haven't been loged in, so the user have to authorize
  if (!$user) {
    $loginUrl = $facebook-&gt;getLoginUrl(
              array(
                  'scope' =&gt; 'publish_stream',
                  'redirect_uri' =&gt; 'http://my-hosting.url/'
              )
      );
      header('Location: '.$loginUrl);
      exit;
  }
  
  try {
      $publishStream = $facebook-&gt;api("/$testid/feed", 'post', array(
          'message' =&gt; 'Hello World',
          'link'  =&gt; 'http://www.example.org/',
          'name' =&gt; 'Test',
          'description' =&gt; 'Wohoo some great text.',
          )
      );
  } catch (FacebookApiException $e) {
      var_dump($e);   
  }
  </code></pre>
  
  <p>I'm playing with the <code>$testid</code> it contains e.g. <em>$user</em> or <em>community page ID</em>.</p>
  
  <p>In case of the user id I get the message on my wall but without any notification with is sad. If I change that to the <em>community page</em> I'll get an exception with this message:</p>
  
  <blockquote>
    <p>(#210) User not visible</p>
  </blockquote>
  
  <p>That seems that the community page is not allowed to to that. Well before I try to get that permission I would like to ask if this way is possible or if I'm just wasting my time.</p>